user14242404
user14242404

Reputation: 593

BackendConfig ignored on Ingress

I'm trying to configure GKE ingress to route traffic to IstioIngressgateway. in order to do so i do the following:

apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
  name: ingress-backendconfig
  namespace: istio-system
spec:
  healthCheck:
    requestPath: /healthz/ready
    port: 15021
    type: HTTP
kind: Service
metadata:
  name: istio-ingressgateway
  namespace: istio-system
  annotations:
    cloud.google.com/backend-config: '{"default": "ingress-backendconfig"}'
    cloud.google.com/neg: '{"ingress": true}'
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: istio-ingress
  namespace: istio-system
  annotations:
    kubernetes.io/ingress.global-static-ip-name: main-ingress
    networking.gke.io/managed-certificates: ingress-cert
spec:
  rules:
  - host: myasm.example.com
    http:
      paths:
      - path: /*
        backend:
          serviceName: istio-ingressgateway
          servicePort: 80

Problem is the Backend for istio created with default healthcheck (serving port 80 and route /), and basically ignores the backend config.

what can be the reason for that? i've tried to delete the resources and recreate them, tried also to give the service wrong backend config to see it reads the annotation and he throws event of 'backend config does not exist' so it does read it.

it might be related to the fact i did it and later re-update the istio installation with istioOperator? is something somewhere hang? not sure how can i make it work again.

as mentioned i've deleted ingress + backendconfig and removed annotation from the service and tried everything all over again, but still the same.

same approach btw works on another cluster. what am i missing and how can i debug it further?

10x

Upvotes: 3

Views: 7452

Answers (2)

user14242404
user14242404

Reputation: 593

After upgrading from GKE 1.16 to 1.17 it started working and Ingress actually used the custom healthcheck

Upvotes: 2

W.Andre
W.Andre

Reputation: 121

Is important to note that if you are using GKE version 1.16-gke.3 or later Google recommend you use the cloud.google.com/backend-config annotation. If you are using an earlier version, use the beta.cloud.google.com/backend-config annotation instead. More information here in the official documentation page.

Upvotes: 0

Related Questions