K8s by Example: Services (NodePort)
| NodePort exposes the Service on a port across all cluster nodes. Accessible from outside the cluster via |
| service-nodeport.yaml | |
| Set | |
| terminal | |
| NodePort is rarely used in production. It requires opening firewall ports and lacks load balancing across nodes. | |
| terminal | |
| NodePort is useful for local development with minikube or kind. Use port-forward for quick access without NodePort. | |