kubernetes networking_error ai_generated true

Error: IngressClass.networking.k8s.io not found

ID: kubernetes/k8s-ingress-class-not-found

Also available as: JSON · Markdown
90%Fix Rate
88%Confidence
55Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
8 active

Root Cause

Ingress resource references an IngressClass that doesn't exist. No ingress controller is installed or the class name is misspelled.

generic

Workarounds

  1. 92% success Install an ingress controller (nginx, traefik, etc.) and verify its IngressClass is created
    helm install ingress-nginx ingress-nginx/ingress-nginx && kubectl get ingressclass

    Sources: https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/

  2. 90% success Set the correct ingressClassName matching the installed controller
    kubectl get ingressclass to find available classes, then set spec.ingressClassName in the Ingress

    Sources: https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class

Dead Ends

Common approaches that don't work:

  1. Remove the ingressClassName field from the Ingress 72% fail

    Without an IngressClass, no controller will pick up the Ingress resource

  2. Annotate the Ingress with deprecated kubernetes.io/ingress.class 60% fail

    Annotation is deprecated in K8s 1.18+ and may not be supported by newer controllers

Error Chain

Leads to:
Preceded by:
Frequently confused with: