-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Controller resolves default-backend pod IP as DNS name if Ingress leads to ExternalName service #12173
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. |
Hi, Another user has raised issue that has similarities with this one.
/kind feature |
@longwuyuan There are two ways to define default-backend, the global backend and the annotation backend. They are not the same:
If the I already hinted why this case is not working #12158 (comment). This PR fixes it #12160. |
The issue here is:
In my curl request I was not trying to trigger an error to lead me to default-backend. Because it's not needed to see the issue.
|
|
@longwuyuan I think I had empathised enough that the issue is not with ExternalName service itself, it resolves fine. The issue is: if you have Looking at resources at your screenshots, I think if you add Also, disconnecting DNS servers or anything related to DNS settings is not related to the issue. |
@meatuses thank you for your update. It helps. I will try now and update |
2024/10/14 17:28:49 [error] 1644#1644: *157646 [lua] dns.lua:152: dns_lookup(): failed to query the DNS server for 10.244.0.26: The config looks like the screenshot below ;
|
What happened:
If an ingress resource leads to service with type
ExternalName
, but also has annotationnginx.ingress.kubernetes.io/default-backend
with the value set to a service with typeClusterIP
, ingress-nginx-controller tries to resolve pod IP of said ClusterIP service as a DNS name. I have attached manifests down in Others section.A lot of following errors are generated in
ingress-nginx-controller
logs.10.111.0.170
is IP of a pod for default-backend service:Seems that the ClusterIP service somehow matched with this condition https://github.com/kubernetes/ingress-nginx/blob/controller-v1.11.3/rootfs/etc/nginx/lua/tcp_udp_balancer.lua#L74-L78
What you expected to happen:
Ingress-nginx-controller
does not try to resolve IP addresses as DNS names.NGINX Ingress controller version v1.11.3
Kubernetes version: v1.27.16
Environment:
uname -a
): 5.15.0-122-generickubectl version
kubectl get nodes -o wide
helm ls -A | grep -i ingress
helm -n <ingresscontrollernamespace> get values <helmreleasename>
kubectl describe ingressclasses
kubectl -n <ingresscontrollernamespace> get all -A -o wide
kubectl -n <ingresscontrollernamespace> describe po <ingresscontrollerpodname>
kubectl -n <ingresscontrollernamespace> describe svc <ingresscontrollerservicename>
kubectl -n <appnamespace> get all,ing -o wide
kubectl -n <appnamespace> describe ing <ingressname>
If applicable, then, your complete and exact curl/grpcurl command (redacted if required) and the reponse to the curl/grpcurl command with the -v flag
Others:
kubectl describe ...
of any custom configmap(s) created and in useingress yaml:
ClusterIP of default-backend service connected to pod, which ingress-nginx tries to resolve as DNS:
the pod:
curl to ingress works (not sure why google returns 404 though):
How to reproduce this issue:
dns_lookup(): failed to query the DNS server for 10.111.0.170
error.Anything else we need to know:
The text was updated successfully, but these errors were encountered: