Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to find matching virtualGateway for gatewayRoute #1

Open
seanlee10 opened this issue Jul 12, 2021 · 1 comment
Open

failed to find matching virtualGateway for gatewayRoute #1

seanlee10 opened this issue Jul 12, 2021 · 1 comment

Comments

@seanlee10
Copy link

seanlee10 commented Jul 12, 2021

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
@seanlee10 seanlee10 reopened this Jul 12, 2021
@praseedasathaye
Copy link
Contributor

@seanlee10 This github project is for the App Mesh workshop https://www.eksworkshop.com/advanced/330_servicemesh_using_appmesh/. Did you use the steps in this workshop?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants