External Ingress
created: Mon, 29 Jul 2024 16:19:31 GMT, modified: Mon, 06 Jan 2025 00:07:38 GMT
Expose cluster services with external public nodes by adding a node with public IP address to the cluster, and labelling it as "ingress", so we can configure ingress controller to run only on these nodes.
# label node and assign a role
kubectl label node ingress-node ingress=true
kubectl label node ingress-node node-role.kubernetes.io/worker=worker
# deploy only selected workloads, e.g. ingress-nginx
kubectl taint node ingress-node ingress=true:NoSchedule
Configure ingress-nginx to deploy to VPS with nodeSelector and tolerations:
controller:
nodeSelector:
ingress: 'true'
tolerations:
- key: "ingress"
operator: "Exists"
effect: "NoSchedule"