-
Notifications
You must be signed in to change notification settings - Fork 655
failed to find matching virtualGateway for gatewayRoute #1
Description
Hi, I'm following the tutorial and got stuck at creating GatewayRoute resource using manifest.
Versions
Kubernetes version 1.20
Platform version eks.1
kubectl client v1.16.8
kubectl server v1.20.4-eks-6b7464
helm v3.6.2
appmesh-controller v1.4.0
I have the following for creating the VGW and GatewayRoute and getting failed to find matching virtualGateway for gatewayRoute error.
VGW gets created successfully but somehow GatewayRoute cannot locate the VGW within the same namespace. I tried different combinations but wasn't able to create the GatewayRoute using the manifest. I can create one in the console without any issue.
I found some help from this link but still couldn't get past the error.
I found some help from this link https://github.com/aws/aws-app-mesh-controller-for-k8s/blob/master/docs/reference/vgw.md but still couldn't get past the error.
Error Message
Error from server (failed to find matching virtualGateway for gatewayRoute: gateway-route, expecting 1 but found 0): error when creating "appmesh/9_virtualgateway.yaml": admission webhook "mgatewayroute.appmesh.k8s.aws" denied the request: failed to find matching virtualGateway for gatewayRoute: gateway-route, expecting 1 but found 0
Manifests
apiVersion: appmesh.k8s.aws/v1beta2
kind: VirtualGateway
metadata:
name: ingress-gw
namespace: my-apps
spec:
namespaceSelector:
matchLabels:
gateway: ingress-gw
gatewayRouteSelector:
matchLabels:
gateway: ingress-gw
podSelector:
matchLabels:
app: ingress-gw
listeners:
- portMapping:
port: 8088
protocol: http
logging:
accessLog:
file:
path: /dev/stdout
---
apiVersion: appmesh.k8s.aws/v1beta2
kind: GatewayRoute
metadata:
name: gateway-route
namespace: my-apps
labels:
gateway: ingress-gw
spec:
httpRoute:
match:
prefix: "/"
action:
target:
virtualService:
virtualServiceRef:
name: my-service-a