Challenge - 5 Problems
Service Connectivity Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Check pod connectivity with
kubectl execYou want to verify if a pod named
webapp-1 can reach the service backend on port 8080. Which command will correctly test this connectivity?Attempts:
2 left
💡 Hint
Remember to use the correct syntax for
kubectl exec with commands.✗ Incorrect
Option D correctly uses
kubectl exec with the pod name, the -- separator, and the command curl backend:8080 to test HTTP connectivity. Option D misses the -- separator, causing a syntax error. Option D uses ping with a port, which is invalid. Option D uses nc but nc may not be installed and the syntax is incomplete.🧠 Conceptual
intermediate1: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?
Attempts:
2 left
💡 Hint
Think about which service type does not expose ports outside the cluster nodes.
✗ Incorrect
ClusterIP exposes the service on an internal IP accessible only within the cluster. NodePort and LoadBalancer expose services externally. ExternalName maps to an external DNS name.
❓ Troubleshoot
advanced2: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?Attempts:
2 left
💡 Hint
Use a command that queries DNS directly.
✗ Incorrect
The
nslookup command queries DNS and shows if the name resolves. curl tests HTTP but fails if DNS fails silently. ping may not be installed or blocked. dig is not always installed in minimal containers.🔀 Workflow
advanced3: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:
Attempts:
2 left
💡 Hint
Start from DNS, then endpoints, then connectivity, then logs.
✗ Incorrect
First verify DNS resolution (step 1), then check if the service has endpoints (step 2), then test actual connectivity (step 3), and finally check application logs (step 4).
✅ Best Practice
expert2: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?
Attempts:
2 left
💡 Hint
Think about what causes endpoints to disappear temporarily.
✗ Incorrect
If pods crash and restart often, the service endpoints list changes, causing intermittent connectivity failures. Service type or image version does not cause intermittent connectivity. Insufficient CPU may cause slowness but not intermittent connection drops.