Skip to content
KubernetesNetworkingTroubleshooting

Kubernetes Service Types: ClusterIP, NodePort, LoadBalancer

July 7, 2026 · 10 min read

Last verified: 2026-07-17

Frequently Asked Questions

What is a Service in Kubernetes?

In Kubernetes, Pods are ephemeral: they die, restart, and change IPs. A Service puts a stable access point in front of a group of Pods. But where you can reach the app from depends on the chosen Service type.

What is the difference between ClusterIP, NodePort, and LoadBalancer?

ClusterIP gives a virtual IP reachable only from inside the cluster and is closed to the outside world. NodePort opens a port in the 30000-32767 range on every node, reachable externally via `<node-ip>:<port>`. LoadBalancer provisions a real external load balancer from your cloud provider and gives a single public IP.

Which Kubernetes Service type should you use, and when?

ClusterIP is used for internal service-to-service traffic and is the default. NodePort suits quick testing or custom network setups. LoadBalancer is the standard way to expose a single service to the internet in production; for many HTTP services, use Ingress + ClusterIP (one LB, many routes).

I can't reach my Kubernetes Service — how do I diagnose it?

About 90% of the time the cause is that the Service selector matches no Pods, so Endpoints is empty. First run `kubectl get endpoints <svc>`; if empty, the selector doesn't match. Then use `kubectl get pods --show-labels` to check whether Pod labels equal the Service selector, and confirm targetPort matches the port the container actually listens on.

Does changing the Service type fix a connectivity problem in Kubernetes?

No. For a connectivity problem you should check `kubectl get endpoints` first; if it's empty, the problem is selector/label matching, not the Service type (NodePort/LoadBalancer). Changing the type won't fix it.

Reading isn't enough — do it.

Practice these topics in an interactive terminal in your browser.