Kubernetes Ingress Not Working - "ingress class not found" / No Address in CI
By Kaveh Alemi·Latchkey
An Ingress is only acted on by a controller that owns its class. With no ingressClassName (and no default IngressClass), or a class no installed controller serves, nothing claims the Ingress - it gets no address and routes nowhere.
What this error means
kubectl get ingress shows an empty ADDRESS, and traffic to the host 404s or never connects. kubectl describe ingress shows no controller events, or the controller logs ingress class "x" is not found.
kubectl output
$ kubectl get ingress
NAME CLASS HOSTS ADDRESS PORTS AGE
api <none> api.example 80 8m
# controller log: ignoring ingress api: no IngressClass / class "nginx" not found
Diagnose it: read events, not just status
A deployment that never becomes ready has the reason in its events and in the pod state, not in the deployment status. Read both before changing the manifest.
Terminal
kubectl rollout status deploy/<name> --timeout=120s
kubectl describe deploy/<name> | sed -n "/Events/,$p"
kubectl get pods -l app=<name> -o wide
kubectl describe pod <pod> | sed -n "/Events/,$p"
kubectl logs <pod> --previous --tail=50 # the crash before the restart
Common causes
No ingressClassName and no default class
Modern controllers ignore Ingresses without a matching class unless one IngressClass is marked default. An Ingress with no class and no default is claimed by nobody.
Class name does not match the controller
A ingressClassName: nginx with no nginx IngressClass installed (or a different controller’s class) means no controller owns it.
How to fix it
List the available classes and the Ingress class
Terminal
kubectl get ingressclass
kubectl get ingress <name> -o jsonpath='{.spec.ingressClassName}'; echo
Set a class the controller serves
Reference an existing IngressClass (or mark one default), then confirm the Ingress gets an address.
ingress.yaml
spec:ingressClassName:nginx # must match an installed IngressClass# or mark one default:# kubectl annotate ingressclass nginx ingressclass.kubernetes.io/is-default-class=true
How to prevent it
Always set ingressClassName explicitly to an installed class.
Mark exactly one IngressClass default if you rely on the default behavior.
Verify the Ingress receives an ADDRESS as part of a deploy check.
Frequently asked questions
What causes Kubernetes ingress not working?
There are 2 common causes: no ingressclassname and no default class and class name does not match the controller. Modern controllers ignore Ingresses without a matching class unless one IngressClass is marked default.
How do I fix Kubernetes ingress not working?
There are 2 fixes depending on which cause you have: list the available classes and the ingress class and set a class the controller serves. Work through them in order, since the first is the most common.
What does Kubernetes ingress not working actually mean?
kubectl get ingress shows an empty ADDRESS, and traffic to the host 404s or never connects.
How do I stop Kubernetes ingress not working happening again?
Always set ingressClassName explicitly to an installed class. The prevention section lists 3 changes that keep it from recurring.