Martin Koníček

Blog

Enabling Low-Range NodePorts Below 1024 in MicroK8s for Traefik Ingress

Showcase image

Setting up an ingress controller like Traefik on MicroK8s often requires the use of lower NodePorts, specifically those below 1024. This range is typically reserved for system services and requires special configuration to be used by Kubernetes services. Here's a concise guide to enable this capability in MicroK8s.

With the lower NodePort range enabled, you can now proceed to deploy your Traefik ingress controller. Configure Traefik to utilize the newly available lower NodePorts. This ensures that Traefik can efficiently manage incoming traffic on standard HTTP and HTTPS ports, enhancing the performance and accessibility of your services.

Tutorial

vi /var/snap/microk8s/current/args/kube-apiserver
...
# allow all nodeports
--service-node-port-range=0-65535
...
microk8s stop
microk8s start
  • MicroK8S failing with Kustomize
    MicroK8S failing with KustomizeWhen you get an error message error: failed to run '/snap/microk8s/5250/usr/bin/git fetch --depth=1 https://... main': fatal: couldn't find remote ref main this might be a solution
  • cs | en