-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Regression when using ExternalName services #13081
Comments
This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The 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-sigs/prow repository. |
It might relate to #13076 but seems a different issue. |
Seems the bug was introduced in 4.11.5 release (4.11.4 is OK). |
I think issue is from this commit c6c5b48 |
same issue here. 4.11.5 and 4.12.1 impacted |
Please do not override the issue template and instead fill it as requested. This is important for reproducing your issue. Also please add information about what |
Sorry will do better next time.
Yes it's a resolvable CNAME. |
Another possibly related issue is that Here is example yamlsapiVersion: apps/v1
kind: Deployment
metadata:
name: echo
spec:
selector:
matchLabels:
app: echo
template:
metadata:
labels:
app: echo
spec:
containers:
- image: inanimate/echo-server
name: echo
enableServiceLinks: false
---
apiVersion: v1
kind: Service
metadata:
name: echo
spec:
selector:
app: echo
ports:
- port: 8080
targetPort: 8080
protocol: TCP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/upstream-vhost: google.com
nginx.ingress.kubernetes.io/custom-http-errors: "301"
nginx.ingress.kubernetes.io/default-backend: echo
prometheus.io/probe: "false"
name: test
spec:
ingressClassName: nginx
defaultBackend:
service:
name: ext
port:
number: 80
---
apiVersion: v1
kind: Service
metadata:
name: ext
spec:
type: ExternalName
externalName: google.com
So in example we trying to use custom errors:
Then we try to forward this 301 to be served from out service
but broken in v1.11.5:
|
Out of curiosity: Can you make it an A / AAAA record? Just wanna see if it's related to the record type. |
In my case it's a A record (without AAAA) resolving into a RFC1918 reserved ip address, outside of the k8s cluster (e.g. 192.168.42.12) |
in my case the same: I've tried as a quick fix to replace RFC1918 IP with temp domain name (A record) but no luck. HTTP503 with plain IP address and with DNS A record. |
Maybe @neerfri can shed some light on this, as they implemented the change. |
Same issue here (v.4.11.5) using ip address as externalName |
Update: changing externalName from an ip address to a (valid) dns-name (A record) seemed to fix my issue.... |
@strongjz any reason why this is closed? This for sure is an undocumented regression. It was previously supported to have an IP address as your |
@wilmardo You seem to be referring to the other closed ticket of #13076 where the response stated, as the documentation also does, that IP addresses as Your statement about this being an undocumented regression remains true, however. The fact that CNAME's now behave such that 503's randomly occur and are sent to the user is clearly an issue, as we are facing the same. If an A record is suppose to fix this, it misses the fact that some of us are proxying to an external service where we don't control the DNS entry, and so have to come up with a hacky workaround, like resolving the name, potentially able to change, and upload that as a new record to be used as the An alternative workaround, potentially impacting your existing ingress configuration and also quite ugly, is to capture the 503 and use the
Truthfully this solution might seem quite dumb to someone who knows the NGINX configuration options better than me, so would love for someone else to chime in on a better workaround. |
@strongjz @Confushion @wilmardo please note this ticket is about using a valid hostname/CNAME (not IP address) as externalName. This is not the same as #13076 I think this ticket should be re-opened since the issue still exists. I still have this traceback on 4.12.1
|
Apologies, folks, I read @Confushion response and thought the issue was resolved. /reopen |
@strongjz: Reopened 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-sigs/prow repository. |
Hi all! @philpep - Your comment stating the difference between this issue and #13076 was important. Thank you. After reading the code again, with the stack-trace you provided in mind, it's clear that Here's what I know:
To sum this knowledge into a plan we can either:
Personally I feel more comfortable with changing the lua code to reduce possible effects on other part of the system. @strongjz @wilmardo @Gacko - As members of the repo please share your opinion and who can escort this change in. It took 1 year to get the original PR merged. I want to make sure if I put in the hours to issue a PR and solve this that there is a member that want's to help us get it merged in a timely manner. Thank you ✌️ |
Hello, first @wilmardo is not a maintainer of this project. Second I think we can get a possible fix in quite fast now, because there's a proper discussion and investigation. This is why I was linking you here, as you have way more context and knowledge around this than I do, so I'm pretty sure we can get this fixed soon. Thank you! |
Hi @neerfri thanks for detailed analysis! While I'm not sure I understand all the details, it appear not everyone have this issue, since people having an IP address and then switching to CNAME fix their issue. So I think it might be related to my environment (dns server or k8s setup). One important thing I omitted to mention is that I'm running a EOL kubernetes 1.28.15 cluster. Given what you said about "Endpoint", maybe there was a change in kubernetes/client-go expecting "nil" values to return empty map or something like this. I plan to upgrade my clusters soon, I'll see if it fixes my issue. What k8s cluster version are using other people having the same issue ? |
I was going to keep quiet but maybe some additional info will help EKS 1.32 The manifest below works fine on v4.11.4 but updating to 4.12.1 breaks
when looking at ingress list files-cache-proxy did not have a ADDRESS with a revert to v4.11.4 everything started working again as expected. sorry for the multiple updates |
Hi All, TL;DR;A pull request was opened to fix this. Updating here as I'm making progress on tracking the source of problem here in order to decide the best course of action. It seems that a behavior regarding the endpoints of a service with type ExternalName has changed, which is the reason for different Kubernetes versions providing different outcomes here. From an hour of digging and thinking about this I'm not sure how we can fix the implementation for Kubernetes versions that do not send the endpoint because the Lua code was reading the DNS entry from the endpoints, I might need to learn more the exact payload we have from Kubernetes for this. @Gacko I've created a PR at #13154 Thank you ✌️ |
After upgrade from chart 4.11.3 to 4.12.1 my ingresses using ExternalName services aren't working anymore (http 503 Service Temporarily Unavailable).
Logs of the controller shows:
Example:
The text was updated successfully, but these errors were encountered: