Kubernetes Service Has No Endpoints: Selectors, Probes & CoreDNS Triage
A Kubernetes Service has no endpoints when its selector matches no ready Pods, so the ClusterIP exists but routes nowhere. This runbook confirms the empty EndpointSlice first, then separates selector typos, failing readiness probes, missing Pods, and the look-alike faults — wrong targetPort, loopback binds, NetworkPolicy and DNS — that survive a populated endpoint list.
Introduction
A Kubernetes Service has no endpoints when the Service object, its ClusterIP and its DNS name all exist, but the list of Pod addresses behind it is empty. Traffic arrives at a valid virtual address and has nowhere to go, so clients see connection refused, an ingress controller answers 502, and nothing in the application log explains why. This runbook works the problem in evidence order: confirm the empty endpoint list, then test the selector, then readiness, then whether Pods exist at all.
Illustrative composite: a checkout API rolls out cleanly, every Pod shows Running, dashboards stay green, and the storefront starts returning 502s within a minute. The on-call engineer restarts the Deployment twice and scales it to five replicas. Nothing changes, because the fault was never in the Pods. A Helm value rename had changed the Pod label from app=checkout to app=checkout-api, while the Service still selected the old value. One kubectl get endpointslices command would have shown an empty list in the first minute, and comparing two label maps would have ended the incident.
That pattern is why this failure wastes so much time. Kubernetes never validates that a Service selector matches anything. An empty match set is a legal state, no controller raises an error, and the Service reports no health problem of its own. The symptom appears one layer away, in clients and proxies, which sends people debugging the wrong component. Start at the endpoint list and the mystery usually collapses to a label, a probe, or a missing Pod.
The 5-minute takeaway
Run kubectl get endpointslices -l kubernetes.io/service-name=1. Kubernetes Service has no endpoints: confirm it in one command
A Kubernetes Service has no endpoints when its EndpointSlices contain no ready Pod addresses, and one command proves it. kubectl get endpointslices -l kubernetes.io/service-name=Two details matter when you read the output. First, a slice object can exist while holding zero endpoints. The controller creates a placeholder slice for a selector-based Service even when nothing matches, so the presence of a slice proves nothing; the addresses inside it are the evidence. Second, addresses can be present but marked not ready. In the YAML form each endpoint carries conditions, including ready. An address with ready: false means a Pod matched the selector but failed readiness, which is a different fault from a selector that matches nothing, and it points at probes rather than labels.
The older kubectl get endpointsAlso note what a populated list does not prove. Endpoints tell you the control plane believes ready Pods exist at those addresses. They do not prove the port is right, the process listens on a routable interface, or a NetworkPolicy lets your client through. That is why the triage forks here: empty list, stay in this runbook's first half; populated list, jump to the look-alike section. Mixing the two paths is how a ten-minute label fix becomes an afternoon of packet captures.
2. How a Kubernetes Service has no endpoints: selector, EndpointSlice controller, dataplane
A Kubernetes Service has no endpoints because of how three separate mechanisms chain together, and the chain has exactly one silent failure point. The Service holds a label selector in spec.selector. The EndpointSlice controller watches Pods in the Service's namespace, selects those whose labels contain every selector pair, and writes their IPs and ports into EndpointSlices, marking each endpoint ready only when the Pod's readiness condition is true. The dataplane — kube-proxy in iptables, IPVS or nftables mode, or a CNI such as Cilium that replaces it — programs forwarding rules from those slices so traffic to the ClusterIP reaches a ready Pod address.
Notice what is missing from that chain: validation. The API server accepts any selector, including one that matches nothing. The EndpointSlice controller treats an empty match set as a normal result and writes an empty slice. The dataplane, seeing zero backends, typically installs a reject rule for the ClusterIP, which is why clients usually get an immediate connection refused rather than a long timeout. No component is malfunctioning. Each one is faithfully reporting that the set of usable backends is empty, and none of them considers that an error worth an event.
The selector semantics explain most surprises. A Service selector is equality-based only: every key-value pair must match exactly, pairs are combined with AND, and matching happens only inside the Service's own namespace. There is no prefix matching, no fallback, and no cross-namespace reach. One extra label key in the selector, one renamed value, or Pods running in a different namespace all produce the same empty set. The Kubernetes CNI lesson covers how the dataplane consumes these slices, but for triage you only need the chain: selector decides membership, readiness decides usability, slices publish the result.
One more mechanism is worth naming because it confuses people during rollouts. When a Pod starts terminating, its endpoint is marked terminating and removed from ready rotation while existing connections drain. During a fast rollout with maxUnavailable set loosely, the ready set can briefly shrink to zero even though Pods exist. That is a capacity and rollout-tuning problem, not a selector problem, and the fix lives in strategy settings and readiness behaviour rather than labels.
3. Kubernetes Service has no endpoints because the selector matches no Pods
A Kubernetes Service has no endpoints most often because its selector matches no Pods, and the fastest proof is to run the selector yourself. Read the selector with kubectl get svcThen compare against reality with kubectl get pods --show-labels. The mismatch is usually embarrassingly small: app=payments in the Service against app=payments-api on the Pods, a tier label present in the selector but absent from the Pod template, or a value that changed when a Helm chart renamed its labels to the app.kubernetes.io/* convention while the Service kept the old keys. Read the two label maps key by key rather than eyeballing them as strings. Selectors fail on one pair, and one pair is easy to miss in a wall of labels.
The namespace variant deserves its own check because it survives label inspection. A Service only ever selects Pods in its own namespace. If the Pods run in payments and the Service sits in checkout, no selector will ever match, and kubectl get pods -lWhen you fix the mismatch, fix the side that is wrong, which is usually the Service. Editing a Service selector takes effect immediately and triggers no rollout. Changing Pod labels means changing the Deployment's template and its own selector, and a Deployment selector is immutable in apps/v1, so relabelling Pods is a delete-and-recreate operation with real risk. After patching, re-run the endpointslices command and watch addresses appear. If they do not, readiness is your next suspect, not a second label problem. The kubectl master guide has the JSONPath and label-query patterns used here if you want them in one place.
4. Kubernetes Service has no endpoints because matching Pods are not ready
A Kubernetes Service has no endpoints whenever every matching Pod is unready, because only ready Pods are published as usable endpoints. The signature is a Pod list showing Running in the STATUS column and 0/1 in the READY column. The container process is up, the Pod looks healthy at a glance, and the EndpointSlice controller correctly keeps it out of rotation because its readiness probe has never succeeded. Running is a statement about the process; Ready is a statement about whether traffic should arrive.
kubectl describe podTwo probe design mistakes cause a large share of these incidents. The first is probing a deep health endpoint that checks downstream dependencies. When the database blips, every replica fails readiness at once, the endpoint list empties, and a partial degradation becomes a total outage that also blocks the very traffic that might have succeeded. Readiness should answer whether this Pod can serve, which for most services means the process is up, initialised and able to accept requests — not whether every dependency is perfect. The second mistake is copying the liveness probe into readiness, or the reverse. Liveness failure restarts the container; readiness failure only removes it from rotation. A slow-starting application with an aggressive liveness probe can be killed before it ever becomes ready, which shows up as restarts rather than a clean 0/1.
Fix the probe or the endpoint it checks, then watch the Pod flip to 1/1 and the endpoint appear in the slice. Resist the temptation to delete the readiness probe to make the incident go away. That restores traffic today and guarantees that the next slow rollout sends requests to Pods that cannot answer them. The Pod lifecycle lesson explains how readiness, liveness and startup probes divide this work, and the CrashLoopBackOff runbook covers the restart-loop version of the same probe mistakes.
5. Kubernetes Service has no endpoints because there are no Pods to select
A Kubernetes Service has no endpoints in the simplest case when no Pods exist at all, and it is worth checking before you blame labels or probes. kubectl get pods in the namespace, plus kubectl get deploymentWhen Pods are missing but should exist, read the namespace events with kubectl get events --sort-by=.lastTimestamp. The usual blockers announce themselves: FailedCreate from a ResourceQuota that rejects new Pods, admission webhooks denying the Pod spec, image pull failures that leave Pods stuck before Running, and scheduling failures that leave them Pending. Each of those has its own runbook, and none of them is fixed at the Service. The Service is downstream evidence, not the fault. This is also where a rollout can fool you: kubectl rollout status may still be progressing while the old ReplicaSet has already scaled down, so check both ReplicaSets before concluding the workload vanished.
There is a subtler version of this case: Pods exist, match the selector, and are ready, but they have no Pod IP yet or are stuck in a terminating state that never completes. A Pod without an IP cannot be published as an endpoint. Terminating Pods are removed from ready rotation, so a namespace full of Pods stuck Terminating — often held by a finalizer or a hung volume detach — can present as an empty service. kubectl get pods -o wide shows IPs and deletion timestamps; read both columns before assuming the selector is wrong.
The discipline here is ordering. Endpoints first, selector second, readiness third, existence fourth, and only then the dataplane. Existence checks feel too basic to bother with during an incident, which is exactly why a scaled-to-zero Deployment survives two hours of label inspection. Run the cheap commands in order and let each one eliminate a layer.
6. Troubleshooting matrix: which Kubernetes Service has no endpoints cause is yours
A Kubernetes Service has no endpoints for a small set of reasons, and the matrix below separates them by evidence rather than by guesswork. Work from the top: each row gives the signal you can observe, the cause it indicates, the command that confirms it, and the fix that addresses that cause and no other. Stop at the first row whose confirmation command proves the cause.
| Signal | Likely cause | Confirm with | Fix |
|---|---|---|---|
| Empty slice, Pods 1/1 Running | Selector matches no Pods | kubectl get pods -l |
Align Service selector with Pod labels |
| Empty slice, Pods 0/1 Running | Readiness probe failing | kubectl describe pod shows Readiness probe failed | Fix probe path, port, auth or timeout |
| Empty slice, no Pods in namespace | Workload scaled to zero or blocked | kubectl get deployment and namespace events | Scale up, or fix quota, admission, image or scheduling |
| Slice has addresses, ready: false | Pods matched but unready | Endpoint conditions in slice YAML | Same readiness fix as the 0/1 case |
| Slice populated, connection refused | Wrong targetPort or loopback bind | Compare Service ports with listening sockets in the Pod | Set targetPort to the real container port; bind 0.0.0.0 |
| Slice populated, timeouts | NetworkPolicy or dataplane drop | kubectl get networkpolicy; test from a debug Pod | Allow the client in policy; check CNI health |
| Name does not resolve | DNS, not endpoints | nslookup from a Pod in the client namespace | Fix namespace-qualified name or CoreDNS |
| Endpoints empty only during rollouts | Ready set drains to zero | Watch slices during a rollout | Tune maxUnavailable, readiness and termination settings |
Two reading rules make the matrix work. First, connection refused and timeout are different evidence. Refused usually means the dataplane actively rejected the connection because no backend exists or the port is closed. Timeout usually means packets were sent and silently dropped, which points at policy or an unresponsive process. Second, a populated slice ends the no-endpoints investigation. If addresses are present and ready, the Service binding is correct, and continuing to edit labels only adds noise to the incident. Move down the matrix to ports, policy and DNS.
7. Endpoints exist but traffic still fails: targetPort, loopback, policy and CoreDNS
A Kubernetes Service has no endpoints is only one of several ways a Service fails, and the look-alikes matter because they share the same client symptom. When the slice is populated and ready but connections still fail, check targetPort first. The Service port is what clients dial; targetPort is the port on the Pod. A Service forwarding 80 to targetPort 8080 while the container listens on 3000 produces endpoints, a valid ClusterIP, and refused connections. Compare kubectl get svcThe loopback bind is the second classic. An application listening on 127.0.0.1 inside its container accepts connections from itself and refuses everyone else, including the Service. The endpoint list is correct, the port number is correct, and traffic still fails. Testing the Pod IP directly from a temporary debug Pod separates this cleanly: if Pod IP plus port fails while localhost inside the container works, the bind address is the fault. Fix the application to listen on 0.0.0.0, not the Service.
NetworkPolicy and DNS complete the set. A default-deny policy that forgets to allow the client namespace, or forgets DNS egress on UDP and TCP 53, produces timeouts with healthy endpoints. Test from a debug Pod in the client namespace so the policy path matches the real client, and remember that policy applies to the Pod identity, not to your laptop. For DNS, the distinction is sharp: if the Service name does not resolve, endpoints were never consulted, and the investigation belongs to CoreDNS, search domains and namespace qualification. A short name only resolves inside its own namespace; cross-namespace clients need8. Fix patterns: a Kubernetes Service has no endpoints repair that stays fixed
A Kubernetes Service has no endpoints repair should change the smallest thing that the evidence indicts, then prove the endpoint list repopulated. For a selector mismatch, patch the Service selector to the labels the Pods actually carry, preferring the stable app.kubernetes.io/name and app.kubernetes.io/instance labels over ad-hoc keys. For readiness, fix the probe target and give slow starters a startupProbe so liveness does not kill them during boot. For a missing workload, restore replicas and then ask why they were zero. The manifest below shows the three objects agreeing with each other, which is the whole game.
Notice the agreements: the Service selector matches the Pod template labels exactly, the named targetPort http resolves to the container port of the same name, readiness checks a dedicated /readyz that reports whether the process can serve, and the startup probe absorbs slow boots. After applying a fix, verify in order: kubectl get pods -l9. Prevention: stop a Kubernetes Service has no endpoints incident before it ships
A Kubernetes Service has no endpoints incident is preventable because every cause is visible in manifests before deployment. The highest-value guardrail is a CI check that renders the manifests and asserts each Service selector matches at least one Pod template in the same namespace. Helm template, kustomize build, or a policy engine can all do this; the tool matters less than the assertion. Selector drift happens during renames, and renames are exactly what code review waves through because each file looks correct alone.
Runtime guardrails catch what CI misses. Alert on Services whose ready endpoint count is zero while their Deployment expects replicas above zero. kube-state-metrics exposes endpoint and deployment replica metrics that make this a short PromQL rule, and it fires on the actual failure state rather than on downstream 502s. Pair it with an alert on readiness probe failures by Deployment, so the probe variant pages with its cause attached. A synthetic in-cluster check that resolves and connects to critical Services from a client namespace catches the policy and DNS variants that endpoint metrics cannot see.
Label discipline prevents the most common cause outright. Standardise on app.kubernetes.io/name as the selector label, treat it as immutable once a Service depends on it, and make renames a deliberate two-step change: add the new label, move the selector, then remove the old label. Keep selectors minimal — every extra pair is another way to match nothing. Version or tier labels belong in selectors only when the Service genuinely must split traffic by them.
Finally, rehearse the triage order until it is boring: slices, selector, readiness, existence, ports, policy, DNS. Teams that run this sequence from a runbook resolve the incident in minutes; teams that start from the client error and work backwards spend the first hour in the wrong layer. The runbook is the prevention for the second incident, even when the first one still happens.
10. Use cases: on-call triage, interview drills and platform guardrails
A Kubernetes Service has no endpoints is a small fault with three distinct audiences, and each one should take something different from this runbook. On call, the value is the order of operations. The slice command converts a vague 502 into a binary question — is the backend set empty or not — and every subsequent command eliminates one layer. Engineers who internalise that order stop restarting healthy Pods, which is the single most common wasted action in these incidents.
In interviews and certification tasks, this scenario is a standard probe because it tests whether you reason from the control plane or from symptoms. The strong answer names the EndpointSlice controller, states that only ready Pods are published, runs the selector directly, and separates connection refused from timeout as different evidence. The weak answer restarts things and checks logs. If you are preparing spoken answers, practise saying the chain out loud: selector decides membership, readiness decides usability, slices publish the result, the dataplane forwards to ready addresses only. That sentence, plus the matrix, covers most follow-up questions an interviewer can ask.
For platform teams, the use case is guardrail design. This fault class is invisible to the API server, so the platform has to make it visible: admission or CI checks for selector-to-template agreement, zero-endpoint alerts, and golden-path charts where the Service and Deployment labels are generated from one value so they cannot drift. The measure of a good platform here is not that engineers debug faster; it is that the mismatch cannot merge. Each audience gets the same mechanism, framed at a different altitude, which is why symptom-first runbooks repay their writing cost across a whole team.
11. Limits, failure modes and senior takeaways
A Kubernetes Service has no endpoints runbook has honest limits. Endpoint state tells you what the control plane published, not what every node's dataplane has programmed; a node with a broken kube-proxy or CNI agent can keep failing after the slice recovers, which is why the final verification should run from a client Pod, ideally on a different node. Endpoint updates are also eventually consistent, so a fix can take a few seconds to propagate; re-check before concluding the fix failed. And headless Services behave differently by design: with clusterIP: None, DNS returns Pod IPs directly, so name resolution failures and endpoint emptiness blur together in a way this runbook's ClusterIP framing only partly covers.
Some failure modes sit outside the matrix. A Service with no selector at all is selector-less by design and expects manually managed EndpointSlices; an empty slice there means the manual process broke, not that labels drifted. ExternalName Services have no endpoints in this sense at all. StatefulSet headless Services publish not-ready addresses when publishNotReadyAddresses is set, which inverts the readiness logic on purpose for peer discovery. Knowing which Service flavour you are holding prevents applying ClusterIP reasoning to objects that never promised it.
The senior takeaways are short. Empty endpoints are a control-plane statement, so debug the control plane first: slices, selector, readiness, existence. Running is not Ready, and that one distinction explains half of these incidents. Connection refused and timeout are different evidence; let the client error route your first command. Fix the Service selector rather than relabelling Pods, keep readiness shallow and honest, and alert on zero ready endpoints so the next occurrence pages you with the diagnosis attached. A Service is a promise that ready Pods exist behind a stable name. When the promise breaks, read the endpoint list — it is the one place the cluster already wrote down the truth.
Frequently Asked Questions
What does it mean when a Kubernetes Service has no endpoints?
It means the Service exists with a ClusterIP and DNS name, but its EndpointSlices contain no ready Pod addresses. The selector matched no Pods, every matching Pod failed readiness, or no Pods exist. Clients get connection refused or an upstream 502 because the dataplane has no backend to forward to.
How do I check if a Kubernetes Service has no endpoints?
Run kubectl get endpointslices -l kubernetes.io/service-name=
Why does a Kubernetes Service has no endpoints when Pods are Running?
Because Running is not Ready. A Pod with a failing readiness probe shows Running with 0/1 in the READY column and is kept out of the endpoint list on purpose. Check kubectl describe pod for the Readiness probe failed event, then fix the probe path, port, authentication or timeout it names.
Can a Kubernetes Service has no endpoints because of a namespace mismatch?
Yes. A Service only selects Pods in its own namespace, so Pods running elsewhere can never match its selector. kubectl get pods -l
Does a Kubernetes Service has no endpoints cause connection refused or timeouts?
Usually an immediate connection refused, because the dataplane installs a reject rule when no backend exists. A long timeout with populated endpoints points elsewhere: NetworkPolicy drops, a wrong targetPort path, or an unresponsive process. The client error is evidence, so note which one you see before debugging.
How do I fix a Kubernetes Service has no endpoints after a label rename?
Patch the Service selector to the labels the Pods now carry; that takes effect immediately and needs no rollout. Avoid relabelling Pods, since a Deployment selector is immutable and changing Pod labels means recreating the Deployment. Then verify the EndpointSlice lists ready addresses and test from a client Pod.
How can I prevent a Kubernetes Service has no endpoints in production?
Assert in CI that every Service selector matches a Pod template in the same namespace, alert on Services with zero ready endpoints while replicas are expected, and standardise on one stable selector label such as app.kubernetes.io/name. Treat label renames as two-step changes so the selector never points at nothing.
Preparing for Senior Platform & SRE Interviews
Practice real-world cluster triage, RBAC debugging, and pod scheduling scenarios in our Kubernetes scenario interview questions hub.
Explore Interview Scenarios →