Objective
Service node port range configuration for ports 80
, 443
and 30000-32767
Issue
Configuration that works: --service-node-port-range=30000-32767
Configuration that doesn’t work: --service-node-port-range=80-80,443-443,30000-32767
Cluster information:
Kubernetes version: 1.15
Cloud being used: bare-metal
Installation method: kubeadm (single control-plane cluster)
Host OS: Debian 9.9
CNI and version: 0.3.0 (Calico 3.7.4)
CRI and version: Docker 18.09.6
1 Like
I believe the reason for that is you cannot assign privileged ports to the node-port range.
If you want to have a service broadcast on ports 80, 443 you’d want to look at using the Ingress object. A couple of popular options are, nginx, traefik, and a more complete list here.
I am implementing ingress using ingress-nginx over a nodeport service.
I need multiple ranges working (e.g. 30000-30200,30400-30600
), it doesn’t necessarily have to be privileged ports.
Node Ports are generally not meaningful numbers, they are auto-allocated. Their most interesting property is that they are unique.
Why do you need multiple ranges?