-
Notifications
You must be signed in to change notification settings - Fork 303
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
GKE Ingress controller ignoring ingress.class annotation #476
Comments
@sfriedel The annotations (e.g. |
@freehan I just checked and all the GCE LB resources still exist. Interestingly the UI shows all backends as healthy while in the
I never changed the ingress class annotation for the affected Ingress resources. They were created with the |
@sfriedel I am not sure why the LB was created in the first place.
This is because ingress-gce controller no longer process this ingress. And it sets it unknown usually when LB was just created https://github.com/kubernetes/ingress-gce/blob/master/pkg/backends/backends.go#L171 Is it possible that some of your scripts adds the ingress class annotation after the ingress was created? For instance, |
@freehan Thank you for taking the time to look into this
I do have other GCE ingresses running in the same GKE cluster. They are living in a separate kubernetes namespace though if that makes a difference.
The ingresses were created via helm, but as far as I'm aware helm only patches resources when it upgrades an existing release. For the affected ingress the helm release is at revision 1 so it was never updated after the initial |
@sfriedel |
@freehan done, thank you! |
@freehan I did not see this behavior again and also since the update to /close |
@sfriedel: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I have a cluster with 1.11.6-gke.3 and I see this behaviour again, I've set the annotation quick describe on the ingress itself:
|
@thomasjungblut Looks like the fix for this has not been released on GKE yet. I'm curious how you got into this state? Did you first create the Ingress and then a couple minutes later add the annotation? |
I'm using helm and I purged and installed it from scratch, so no- this should've been one transaction ideally. It's some really weird interaction and I'm also not entirely sure if Helm isn't to blame (v2.12.3). I'm co-deploying After I fixed the leader election issue, I receive the following in my logs, which show that it was removing the external loadbalancer from the status field:
Which is an even funnier state, the load balancer continues to exist but the status in the ingress resource doesn't reflect it anymore (GCE annotations are still there though). If I deploy the ingress cleanly (via kubectl delete and helm upgrade, so the nginx ingress controller is already running) I don't see the loadbalancer-controller interfering. So looks like this is some race between deploying the nginx ingress controller and the ingress that is picked up by the loadbalancer-controller. Is my assumption correct that the loadbalancer-controller will just create a load balancer if there is no competing "ingress.class" annotation and thus ignore the annotation completely? If so, then I would simply need to setup a hook in Helm to have the ingress applied after everything else. Not sure if I would expect this behaviour from the loadbalancer-controller though without the nginx ingress controller deployed, should be fairly easy to test in isolation. |
@thomasjungblut Sorry for the delay in response.
If there is no ingress.class annotation present, ingress-gce will go ahead and create the LB. If the annotation is present but not set to "gce", it will not create the LB. Hope that clarifies. Is there anything else I can do to help on this issue or should it be closed? |
Makes sense, let's close. Thanks for the clarification. |
Recently , I have same issue on both clusters.... |
I'm running multiple ingress controllers on GKE, ingress-gce via the "HTTP load balancing" addon and ingress-nginx installed via the helm chart.
This setup was working nicely for roughly half a year but since the latest upgrade to 1.10.7-gke.1 the gce ingress controller is creating cloud load balancers for Ingress resources that it should not act on because they have an
kubernetes.io/ingress.class: nginx
annotation.This is one if the Ingress resources that the GCE ingress controller created a load balancer for:
Any ideas why this is happening?
The text was updated successfully, but these errors were encountered: