TLDR
Update the annotation to be kubernetes.io/ingress.class: public
Why
For MicroK8s v1.21, running
microk8s enable ingress
Will create a DaemonSet called nginx-ingress-microk8s-controller in the ingress namespace.
If you inspect that, there is a flag to set the ingress class:
- args:
... omitted ...
- --ingress-class=public
... omitted ...
Therefore in order to work with most examples online, you need to either
- Remove the
--ingress-class=publicargument so it defaults tonginx - Update annotations like
kubernetes.io/ingress.class: nginxto bekubernetes.io/ingress.class: public