How to fix IngressClass not found in Kubernetes

KubernetesBEGINNERMEDIUMUpdated Dec 6, 2025· 171 views

The "IngressClass not found" error occurs when your Ingress resource references an IngressClass that doesn't exist in your cluster. This typically happens when the Ingress controller (like NGINX) hasn't been installed or when there's a mismatch between the configured class name and the actual controller.

Quick fix

Fixes IngressClass not found

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install nginx-ingress ingress-nginx/ingress-nginx \
  --namespace ingress-nginx \
  --create-namespace
  1. Verify which Ingress classes are available
  2. Install NGINX Ingress Controller (most common)
  3. Create IngressClass manually if controller is installed
  4. Check your Ingress references the correct class name
kubernetes — error
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install nginx-ingress ingress-nginx/ingress-nginx \
--namespace ingress-nginx \
--create-namespace
IngressClass not found

What this error means

An IngressClass is a Kubernetes resource that represents an Ingress controller implementation. When you specify `ingressClassName` in your Ingress resource, Kubernetes looks for a matching IngressClass object. If it doesn't find one, the Ingress resource cannot be processed and returns this error. Since Kubernetes 1.22, IngressClass is required for Ingress resources (the old annotation method is deprecated). The error indicates either the Ingress controller hasn't been deployed, or you're referencing a class name that doesn't match any installed controller.

Typical symptoms

  • Ingress resources remain in pending state without an external IP or hostname
  • kubectl logs show: "Error when getting IngressClass [name]: ingressclasses.networking.k8s.io [name] not found"
  • `kubectl get ingressclass` returns "No resources found"
  • Ingress controller pods crash with CrashLoopBackOff or fail to start
  • Traffic doesn't route to backend services despite Ingress rules being defined
  • Ingress describe shows "Unable to resolve IngressClass" or similar messages

Common causes

  1. Ingress controller (NGINX, Traefik, etc.) not installed in the cluster
  2. IngressClass resource created with wrong controller name that doesn't match the actual controller
  3. Using deprecated `kubernetes.io/ingress.class` annotation instead of `spec.ingressClassName` field in Kubernetes 1.22+
  4. Kubernetes API version mismatch—using old `networking.k8s.io/v1beta1` instead of `networking.k8s.io/v1`
  5. IngressClass exists but in wrong namespace or with wrong controller specification
  6. Missing default IngressClass when Ingress doesn't specify ingressClassName

How to fix "IngressClass not found"

1Verify which Ingress classes are available

Run kubectl get ingressclass to list all available IngressClass resources. If the list is empty, no Ingress controller is installed. Check what you referenced in your Ingress: kubectl get ingress -A -o jsonpath="{.items[*].spec.ingressClassName}" to see all configured class names.

2Install NGINX Ingress Controller (most common)

Using Helm is the easiest method:

bash
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install nginx-ingress ingress-nginx/ingress-nginx \
  --namespace ingress-nginx \
  --create-namespace

This automatically creates an IngressClass named "nginx". Verify: kubectl get ingressclass. For other controllers (Traefik, HAProxy, etc.), check their official documentation for Helm charts or manifests.

3Create IngressClass manually if controller is installed

If your Ingress controller is running but IngressClass doesn't exist, create it:

yaml
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
  name: nginx
spec:
  controller: k8s.io/ingress-nginx

Save as ingressclass.yaml and apply: kubectl apply -f ingressclass.yaml. Verify with kubectl get ingressclass nginx.

4Check your Ingress references the correct class name

Update your Ingress resource to use correct ingressClassName:

yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: my-ingress
spec:
  ingressClassName: nginx  # Must match your IngressClass name
  rules:
  - host: example.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: my-service
            port:
              number: 80

Apply: kubectl apply -f ingress.yaml.

5Mark one IngressClass as default (optional)

If you have multiple IngressClass objects and omit ingressClassName from Ingress specs, Kubernetes uses the default. Mark one as default:

yaml
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
  name: nginx
  annotations:
    ingressclass.kubernetes.io/is-default-class: "true"
spec:
  controller: k8s.io/ingress-nginx

Apply: kubectl apply -f ingressclass.yaml. Now Ingress resources without ingressClassName will use this class.

6Verify Ingress controller is running

Check if the controller pods are deployed: kubectl get pods -n ingress-nginx (or your controller namespace). All pods should be Running. If they're CrashLoopBackOff, check logs: kubectl logs -n ingress-nginx <pod-name>. For other controllers, check their namespace (e.g., traefik, kube-system).

7Use correct Kubernetes API version

Ensure your manifests use apiVersion: networking.k8s.io/v1 (not v1beta1). The v1beta1 API is deprecated in Kubernetes 1.22+ and removed in 1.25+. Check your Kubernetes version: kubectl version --short. If using older versions (pre-1.18), use the annotation method instead: kubernetes.io/ingress.class: nginx (without ingressClassName field).

Advanced notes

Different Kubernetes distributions have different default Ingress controllers: Minikube requires enabling with minikube addons enable ingress, Docker Desktop has none by default, Kind requires manual setup. Cloud providers (AWS EKS, Azure AKS, GCP GKE) may provide their own Ingress implementations—check cloud documentation for default controller names. When using Ingress with service mesh (Istio, Linkerd), you may need separate VirtualService/Gateway resources in addition to Ingress. The controller field in IngressClass spec must exactly match what your controller registers—for NGINX it's "k8s.io/ingress-nginx", for others check documentation. ArgoCD and Flux deployments must install Ingress controller before deploying Ingress resources, or use init containers/hooks to ensure ordering.

Frequently asked questions

What does "IngressClass not found" mean?
An IngressClass is a Kubernetes resource that represents an Ingress controller implementation. When you specify ingressClassName in your Ingress resource, Kubernetes looks for a matching IngressClass object. If it doesn't find one, the Ingress resource cannot be processed and returns this error.
How do I fix "IngressClass not found"?
The "IngressClass not found" error occurs when your Ingress resource references an IngressClass that doesn't exist in your cluster. This typically happens when the Ingress controller (like NGINX) hasn't been installed or when there's a mismatch between the configured class name and the actual controller.
What causes "IngressClass not found"?
Ingress controller (NGINX, Traefik, etc.) not installed in the cluster IngressClass resource created with wrong controller name that doesn't match the actual controller Using deprecated kubernetes.io/ingress.class annotation instead of spec.ingressClassName field in Kubernetes 1.22+
Is the "IngressClass not found" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading