Microk8s dashboard using nginx-ingress via http not working Error no matches for kind Ingress in version extensions/v1beta1
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
The error no matches for kind "Ingress" in version "extensions/v1beta1" occurs because the extensions/v1beta1 API version for Ingress was removed in Kubernetes 1.22. Starting from Kubernetes 1.19, Ingress moved to networking.k8s.io/v1, and the old API versions (extensions/v1beta1 and networking.k8s.io/v1beta1) were deprecated and eventually removed. The fix is to update your Ingress manifest to use apiVersion: networking.k8s.io/v1 with the updated spec format.
The Error
This happens when applying an Ingress manifest that uses the old API version on Kubernetes 1.22+.
Fix: Update the API Version
Key changes in networking.k8s.io/v1:
pathTypeis now required (Prefix,Exact, orImplementationSpecific)backenduses nestedservice.nameandservice.port.numberinstead ofserviceName/servicePortingressClassNamereplaces thekubernetes.io/ingress.classannotation
MicroK8s Setup
Complete Dashboard Ingress Configuration
Checking and Converting Old Manifests
API Version Reference
Always use networking.k8s.io/v1 for any cluster running Kubernetes 1.19 or later.
HTTP vs HTTPS Backend
The Kubernetes dashboard serves HTTPS by default on port 443. Without the backend-protocol: "HTTPS" annotation, nginx tries HTTP to the backend and gets a connection error.
Common Pitfalls
- Using deprecated API versions:
extensions/v1beta1was removed in Kubernetes 1.22. Always check your cluster version withkubectl versionand usenetworking.k8s.io/v1. - Missing
pathTypefield: Innetworking.k8s.io/v1,pathTypeis required. Omitting it causes a validation error. UsePrefixfor path prefix matching orExactfor exact path matching. - Missing
ingressClassName: Thekubernetes.io/ingress.classannotation is deprecated in favor ofspec.ingressClassName. For MicroK8s with the ingress addon, useingressClassName: nginx(orpublicdepending on the MicroK8s version). - Wrong namespace: The Kubernetes dashboard runs in
kube-system(orkubernetes-dashboardnamespace in some setups). The Ingress must be in the same namespace as the service it routes to, or you must use an ExternalName service. - Backend protocol mismatch: The dashboard uses HTTPS by default. Without
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS", the ingress controller tries plain HTTP to the backend and gets a 400 error or connection reset.
Summary
- Update
apiVersionfromextensions/v1beta1tonetworking.k8s.io/v1 - Add required
pathTypefield (PrefixorExact) to each path - Use nested
service.nameandservice.port.numberinstead ofserviceName/servicePort - Set
ingressClassName: nginxinstead of the deprecatedkubernetes.io/ingress.classannotation - Add
backend-protocol: "HTTPS"annotation when the backend service uses HTTPS - Enable MicroK8s addons (
dns,dashboard,ingress) before creating the Ingress resource

