0
0
Kubernetesdevops~5 mins

Debugging service connectivity in Kubernetes - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the first step to check when a Kubernetes service is not reachable?
Check if the pods behind the service are running and ready using kubectl get pods and kubectl describe pod <pod-name>.
Click to reveal answer
beginner
How can you verify the endpoints associated with a Kubernetes service?
Use kubectl get endpoints <service-name> to see which pod IPs and ports the service routes to.
Click to reveal answer
intermediate
What command helps you test connectivity from inside a pod to a service?
Use kubectl exec -it <pod-name> -- curl <service-name>:<port> to test if the service is reachable from the pod.
Click to reveal answer
intermediate
Why is checking the service type important when debugging connectivity?
Because service types like ClusterIP, NodePort, and LoadBalancer expose services differently, affecting how you can access them.
Click to reveal answer
advanced
What role do Network Policies play in service connectivity?
Network Policies can restrict or allow traffic to pods, so misconfigured policies can block service access.
Click to reveal answer
Which command shows the pods behind a Kubernetes service?
Akubectl get services
Bkubectl get endpoints <service-name>
Ckubectl get nodes
Dkubectl describe pod <pod-name>
What does a ClusterIP service type do?
ABlocks all traffic to the service
BExposes the service on each node's IP at a static port
CExposes the service only inside the cluster
DExposes the service externally using a cloud provider's load balancer
How can you test if a pod can reach a service?
Akubectl logs <pod-name>
Bkubectl get pods
Ckubectl describe service <service-name>
Dkubectl exec -it <pod-name> -- curl <service-name>:<port>
What might cause a service to be unreachable despite pods running?
ANetwork Policies blocking traffic
BPods are in Running state
CService has endpoints
Dkubectl is installed
Which command helps you see detailed info about a pod's status?
Akubectl describe pod <pod-name>
Bkubectl get service <service-name>
Ckubectl get nodes
Dkubectl get endpoints <service-name>
Explain the steps you would take to debug why a Kubernetes service is not reachable from inside the cluster.
Think about checking pods, endpoints, connectivity tests, and network rules.
You got /5 concepts.
    Describe how Network Policies can affect service connectivity in Kubernetes and how to verify if they are causing issues.
    Focus on traffic rules and testing connectivity.
    You got /4 concepts.