Closed
Description
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:
2025/03/25 10:22:17 [error] 26#26: *33847 lua entry thread aborted: runtime error: /etc/nginx/lua/balancer.lua:78: bad argument #1 to 'ipairs' (table expected, got nil)
stack traceback:
coroutine 0:
[C]: in function 'ipairs'
/etc/nginx/lua/balancer.lua:78: in function 'resolve_external_names'
/etc/nginx/lua/balancer.lua:114: in function 'sync_backend'
/etc/nginx/lua/balancer.lua:148: in function </etc/nginx/lua/balancer.lua:146>, context: ngx.timer
Example:
apiVersion: v1
kind: Service
metadata:
name: example
spec:
type: ExternalName
externalName: internal.example.com
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example.com
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
rules:
- host: example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: example
port:
number: 443
tls:
- hosts:
- example.com
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done
Activity
k8s-ci-robot commentedon Mar 25, 2025
This issue is currently awaiting triage.
If Ingress contributors determines this is a relevant issue, they will accept it by applying the
triage/accepted
label and provide further guidance.The
triage/accepted
label can be added by org members by writing/triage accepted
in a comment.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.
philpep commentedon Mar 25, 2025
It might relate to #13076 but seems a different issue.
philpep commentedon Mar 25, 2025
Seems the bug was introduced in 4.11.5 release (4.11.4 is OK).
philpep commentedon Mar 25, 2025
I think issue is from this commit c6c5b48
tolix1 commentedon Mar 26, 2025
same issue here. 4.11.5 and 4.12.1 impacted
Gacko commentedon Mar 26, 2025
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
internal.example.com
is pointing at. Are these IP addresses? Is it a CNAME?philpep commentedon Mar 26, 2025
Sorry will do better next time.
Yes it's a resolvable CNAME.
sepich commentedon Mar 26, 2025
Another possibly related issue is that
nginx.ingress.kubernetes.io/default-backend
stopped working forexternalName
Ingresses.Here is example yamls
So in example we trying to use custom errors:
https://kubernetes.github.io/ingress-nginx/examples/customization/custom-errors/
In this case we access
google.com
via http/80 and get redirect to https:Then we try to forward this 301 to be served from out service
echo
.It works in v1.11.4:
but broken in v1.11.5:
Gacko commentedon Mar 26, 2025
Out of curiosity: Can you make it an A / AAAA record? Just wanna see if it's related to the record type.
philpep commentedon Mar 27, 2025
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)
vasili439 commentedon Mar 27, 2025
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.
24 remaining items