Explain why a service has no traffic
A good diagnosis should be repeatable by another engineer. We will record the environment, run a bounded test and verify the result from the service boundary.Our specific objective is explain why a service h…
A good diagnosis should be repeatable by another engineer. We will record the environment, run a bounded test and verify the result from the service boundary.
Our specific objective is explain why a service has no traffic. A service without ready endpoints cannot route successfully.
What you need before starting
Use the correct Kubernetes context or Docker host, read access to workload definitions, and a maintenance window for any later change. Print the active context, namespace and workload revision. Save the current manifest and recent events. If data is involved, verify the storage backup independently of the deployment object.
Run the diagnostic in a controlled way
Start by printing the command rather than pasting it into an unidentified shell. Confirm every hostname, path and placeholder, then execute it from a session whose output you can preserve.
kubectl get endpointslices -l kubernetes.io/service-name=APP- Check 1:
kubectl get endpointslices -l kubernetes.io/service-name=APP. Run it without piping away errors and retain the complete output.
If the command contains &&, the shell runs the next check only after the previous one exits successfully. That protects the sequence from continuing on obviously invalid input, but it does not prove the result is operationally correct.
How to interpret what you see
Separate scheduling, image pull, startup, readiness, runtime and service-routing failures. Each stage leaves different evidence; restarting pods too early can erase the most useful clue. For this task, keep returning to the original question: A service without ready endpoints cannot route successfully.
| Observation | Meaning | Next move |
|---|---|---|
| Expected output and exit status 0 | The diagnostic ran and returned a normal result. | Compare it with the baseline and continue to service-level verification. |
| Empty output | Possibly a healthy state, wrong scope, insufficient privilege or an overly narrow filter. | Confirm context and remove one filter at a time. |
| Permission or connection error | The observation path failed; it says nothing conclusive about the target service. | Fix access or test from an authorized vantage point. |
| Unexpected large result | The question may be too broad or the condition may be systemic. | Save evidence, narrow by time or component, and avoid impulsive bulk action. |
Verification that closes the loop
Watch rollout status, inspect ready endpoints, read current and previous container logs, and send a request through the same Service or Ingress path used in production. Record the before and after outputs alongside the exact time and revision. If a user-facing path exists, test it independently; do not substitute an internal status command for customer evidence.
Failure modes worth avoiding
Do not force-delete pods, prune images or edit live objects before saving state. A replacement pod becoming Running is not proof that readiness, storage and traffic are correct.
The safest operator is not the one who never encounters failure. It is the one who preserves enough evidence to explain the failure and enough control to recover cleanly.
Rollback and handover
Use rollout undo or reapply the saved manifest at the known-good image digest. Verify endpoints and persistent data before returning full traffic. Close the task with a short note containing the symptom, diagnostic output, decision, verification and any follow-up monitoring.
This guide follows the official reference linked below. Check the documentation for the exact version running in your environment because flags, defaults and output fields can change.
Primary source: Review the official reference ↗