KCNA ยท Application delivery and debugging
Debugging connectivity and configuration
Service selectors and endpoints, DNS checks, wrong config or env, network policy blocks.
Key points
- A Service sends traffic only to Ready Pods whose labels match its selector; those are its endpoints.
- Empty endpoints: check selector against Pod labels, and Pod readiness.
- Endpoints exist but requests fail: check targetPort matches the app's port, then NetworkPolicies.
- DNS: nslookup from a Pod (name, name.namespace or full svc.cluster.local form).
- Also inspect env vars and mounted config for typos.
Source: https://kubernetes.io/docs/tasks/debug/debug-application/debug-service/
Practice questions
A Service shows no endpoints. What is the most likely cause?
- Its selector matches no Ready Pods
- The cluster has too many nodes
- The Service name is too long
- kubectl is out of date
Show answer
Answer: A. Its selector matches no Ready Pods
Endpoints are built from Pods that match the selector and are Ready, so no match or no ready Pods means an empty list.
Which statements about checking Service DNS from a Pod are correct?
- nslookup <service> can be run from a debug Pod
- From another namespace, <service>.<namespace> can be used
- The full form is <service>.<namespace>.svc.cluster.local
- A Service name resolves to the IP of one specific Pod
- DNS names are case-sensitive Pod labels
Show answer
Answer: A. nslookup <service> can be run from a debug Pod, B. From another namespace, <service>.<namespace> can be used, C. The full form is <service>.<namespace>.svc.cluster.local
The page's checks use short, namespaced and fully qualified names. A Service name resolves to its ClusterIP, not one Pod.
True or false: if a Service has endpoints, requests through it cannot fail.
Show answer
Answer: False
Endpoints exist but may point to a port nothing listens on (targetPort mismatch), or a NetworkPolicy may block the traffic.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
