--- apiVersion: appmesh.k8s.aws/v1beta2 kind: VirtualGateway metadata: name: ingress-gw namespace: appmesh-ns spec: namespaceSelector: matchLabels: gateway: ingress-gw podSelector: matchLabels: app: ingress-gw listeners: - portMapping: port: 8088 protocol: http healthCheck: protocol: http path: '/' healthyThreshold: 3 unhealthyThreshold: 5 timeoutMillis: 5000 intervalMillis: 5000 --- apiVersion: appmesh.k8s.aws/v1beta2 kind: GatewayRoute metadata: name: gateway-route-flask namespace: appmesh-ns spec: httpRoute: match: prefix: "/" action: target: virtualService: virtualServiceRef: name: flask --- apiVersion: v1 kind: Service metadata: name: ingress-gw namespace: appmesh-ns annotations: service.beta.kubernetes.io/aws-load-balancer-type: "nlb" spec: type: LoadBalancer ports: - port: 80 targetPort: 8088 name: http selector: app: ingress-gw --- apiVersion: apps/v1 kind: Deployment metadata: name: ingress-gw namespace: appmesh-ns spec: replicas: 1 selector: matchLabels: app: ingress-gw template: metadata: labels: app: ingress-gw spec: containers: - name: envoy image: 840364872350.dkr.ecr.us-west-2.amazonaws.com/aws-appmesh-envoy:v1.15.0.0-prod ports: - containerPort: 8088