0
0
Kubernetesdevops~20 mins

Debugging service connectivity in Kubernetes - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Service Connectivity Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Check pod connectivity with kubectl exec
You want to verify if a pod named webapp-1 can reach the service backend on port 8080. Which command will correctly test this connectivity?
Akubectl exec -it webapp-1 -- ping backend 8080
Bkubectl exec webapp-1 curl backend:8080
Ckubectl exec webapp-1 -- nc -z backend 8080
Dkubectl exec webapp-1 -- curl backend:8080
Attempts:
2 left
💡 Hint
Remember to use the correct syntax for kubectl exec with commands.
🧠 Conceptual
intermediate
1:30remaining
Understanding Kubernetes Service Types
Which Kubernetes service type exposes the service on a cluster-internal IP only, making it reachable only from within the cluster?
ANodePort
BClusterIP
CLoadBalancer
DExternalName
Attempts:
2 left
💡 Hint
Think about which service type does not expose ports outside the cluster nodes.
Troubleshoot
advanced
2:00remaining
Diagnosing DNS resolution failure inside a pod
A pod cannot resolve the service name database. Which command inside the pod will help verify if DNS resolution is working?
Anslookup database
Bcurl database
Cping -c 1 database
Ddig database
Attempts:
2 left
💡 Hint
Use a command that queries DNS directly.
🔀 Workflow
advanced
3:00remaining
Order the steps to debug a Kubernetes service connectivity issue
Put these steps in the correct order to debug why a pod cannot connect to a service:
A1,2,3,4
B2,1,3,4
C3,1,2,4
D1,3,2,4
Attempts:
2 left
💡 Hint
Start from DNS, then endpoints, then connectivity, then logs.
Best Practice
expert
2:30remaining
Identify the cause of intermittent service connectivity failures
A Kubernetes service intermittently fails to connect to its pods. Which is the most likely cause?
AThe service type is ClusterIP instead of NodePort.
BThe pod's container image is outdated.
CPods are crashing and restarting frequently causing endpoints to be temporarily missing.
DThe cluster nodes have insufficient CPU resources.
Attempts:
2 left
💡 Hint
Think about what causes endpoints to disappear temporarily.