How to expose external IP of one Node Kubernetes Ingress Service into the internet

12/12/2021

I installed a one node Kubernetes with kubeadm. This is on a vServer "bare metal" with dedicated external static IP.

With these components/settings:

  • calico (default settings)
  • MetalLB (Layer 2 config with address range 192.168.1.240-192.168.1.250)
  • Traefik (default settings)

Now a traefik service is exposed as an "external IP" but the IP is 192.168.1.240. This is external from k8s point of view but how do I expose the ingress service to the internet?

I do not want to set up an additional external load balancer. How can I achieve this?

-- Dieshe
kubernetes
kubernetes-ingress
metallb
traefik
traefik-ingress

1 Answer

12/12/2021

metalLB is not needed at all. When you install traefik add this value file (as traefik.yaml in this case):

service:
  externalIPs:
    - <your_external_static_ip_here_without_the_brackets>

and then install it like this: helm install --values=./traefik.yaml traefik traefik/traefik -n traefik --create-namespace

-- Dieshe
Source: StackOverflow