-
Notifications
You must be signed in to change notification settings - Fork 301
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
Firewall rule not updated properly with NEG if service uses name in targetPort or does not name its port #703
Comments
/assign @freehan |
It appears this also effects creation of Endpoints in Endpoint Groups. I found that it only created them if the targetPort was a number rather than a name. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: 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. |
Under some conditions, the
k8s-fw-l7--<uid>
firewall rule managed by theingress-gce
controller does not include the target pod's port to the list of allowed ports.When this happens, health checks do not reach the pods and all requests end up in HTTP 502 errors.
For example, with the following service configuration:
The pods selected by this service have one container with a corresponding port named
http
andhttpGet
readiness/liveness probes referencing that port:And FWIW, the ingress:
I've identified two work-arounds for now:
targetPort
instead of the port name:When any of those two changes is applied separately, the corresponding port is almost instantly added to the firewall rule:
And health checks reach the pods and all requests end up in HTTP 200 status.
Reverting those changes ends up in the original situation: port missing in firewall rule, failed health checks and 502 errors.
Tested on GKE master version 1.11.7-gke.12 with supposedly
ingress-gce
v1.4.3 according to https://github.com/kubernetes/ingress-gce/blob/master/README.md#gke-version-mapping.I've yet to check if the issue is still current with
ingress-gce
v1.5.0 on GKE 1.12.5-gke.10+.Having access to the GKE managed
ingress-gce
logs would greatly help troubleshooting these kind of errors. I did not face this issue in our preproduction environment because the same port was already allowed by another service that named its port.PS: I've learned from reading the GCE ingress controller code that NEGs do not require services to be of type
NodePort
but I'm still in the process of converting ingresses to container native load balancing by adding thecloud.google.com/neg: '{"ingress": true}'
. I'll convert those services back toClusterIP
once done.I believe this issue should be referenced by #583.
The text was updated successfully, but these errors were encountered: