0

Using gke cluster but ingress is not loading a load Balancer

error:error syncing to gcp: error running load balancer syncing routine secret does not exist

I want to know the reason why iam getting error

I want to fix this issue

1 Answers1

1

As per this official doc

Cause of this error is An empty secretName field is no longer an acceptable configuration and is not supported. The hosts field is not used by Google Kubernetes Engine because the Common Name is read from the certificate. As a result, Google-managed certificates do not require the IngressTLS object to be specified in the ingress manifest, but self-managed certificates only require the secretName field in the IngressTLS object to be specified.

To fix this error:

You must validate that the load balancer is utilizing a Google-managed certificate and that the IngressTLS object (for example, tls) in the Google Kubernetes Engine ingress manifest contains the host's entry. As an example:

   apiVersion: networking.k8s.io/v1beta1
        
        kind: Ingress
        
        metadata:
        
          name: my-ingress-1
        
          annotations:
        
            ...
        
            networking.gke.io/managed-certificates: <certificate-name>
            kubernetes.io/ingress.class: "gce"
      spec:
        
         rules:
        
          ...
        
          tls:
        
          - hosts:
            - a
            - b 

status:   

   loadBalancer: {}

As you confirmed you are using a Google-managed certificate, the IngressTLS object is unnecessary and should be omitted from the ingress manifest. As an example:

 tls:
  - hosts:
    - a
    - b