Add on: Ingress

Being pretty new to microk8s and kubernetes in general, it also took me hours to get cert-manager working with microk8s because I had to change the class name to public.

I think it would be good if the microk8s docs would mention this clearly.

Trying to expose 4001/TCP+UDP does not seem to work. Can only choose one of them.

    spec:
      containers:
        - name: nginx-ingress-microk8s
          image: 'k8s.gcr.io/ingress-nginx/controller:v0.44.0'
          args:
            - /nginx-ingress-controller
            - '--configmap=$(POD_NAMESPACE)/nginx-load-balancer-microk8s-conf'
            - >-
              --tcp-services-configmap=$(POD_NAMESPACE)/nginx-ingress-tcp-microk8s-conf
            - >-
              --udp-services-configmap=$(POD_NAMESPACE)/nginx-ingress-udp-microk8s-conf
            - '--ingress-class=public'
            - ' '
            - '--publish-status-address=127.0.0.1'
          ports:
            - name: http
              hostPort: 80
              containerPort: 80
              protocol: TCP
            - name: https
              hostPort: 443
              containerPort: 443
              protocol: TCP
            - name: prox-tcp-4001
              hostPort: 4001
              containerPort: 4001
              protocol: TCP
            - name: prox-udp-4001
              hostPort: 4001
              containerPort: 4001
              protocol: UDP

Once I apply these changes, the DaemonSet seems to accept it. But removes the UDP section internally from the config. Same, when I add the UDP section first, then TCP is removed.

How to expose both TCP+UDP for the same port?

@monky, you may have hit this kubernetes bug:

If you want both to work, they have to be created that way, updates will only give you one or the other because of the way key merging works

Hey, the Ingress docs page should reference the Metallb docs explaining how to set up Ingress with Metallb IPs. It took my a while and some help on Slack to figure this out. I noticed no svc of type loadbalancer was created so I tried to define the svc myself. It’s not obvious and shouldn’t be expected that you check Metallb docs page to find out how to have ingress-nginx add on use a load balancer.

Text suggestion:
“To use Ingress with a load balancer, see Metallb docs.”