0
0
Kubernetesdevops~10 mins

Debugging service connectivity in Kubernetes - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to check the status of all pods in the default namespace.

Kubernetes
kubectl get [1]
Drag options to blanks, or click blank then click option'
Adeployments
Bservices
Cnodes
Dpods
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'services' instead of 'pods' will list services, not pods.
Using 'nodes' lists cluster nodes, not pods.
2fill in blank
medium

Complete the command to describe a service named 'webapp' to check its details.

Kubernetes
kubectl [1] service webapp
Drag options to blanks, or click blank then click option'
Adescribe
Blogs
Cget
Dexec
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'get' only lists basic info.
Using 'logs' or 'exec' are for pods, not services.
3fill in blank
hard

Fix the error in the command to check logs of a pod named 'api-server'.

Kubernetes
kubectl logs [1]
Drag options to blanks, or click blank then click option'
Aapi-server
Bapi_server
Capi-server-1
Dapi.server
Attempts:
3 left
💡 Hint
Common Mistakes
Using underscores or dots in pod names causes errors.
Using incomplete or wrong pod names.
4fill in blank
hard

Fill both blanks to create a command that tests connectivity from a pod named 'tester' to the service 'backend' on port 80.

Kubernetes
kubectl exec [1] -- curl [2]:80
Drag options to blanks, or click blank then click option'
Atester
Bbackend
Cfrontend
Dlocalhost
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong pod or service names.
Trying to curl 'localhost' which tests the pod itself, not the service.
5fill in blank
hard

Fill all three blanks to create a command that lists pods with label 'app=web' in the 'production' namespace.

Kubernetes
kubectl get pods -n [1] -l [2]=[3]
Drag options to blanks, or click blank then click option'
Adefault
Bapp
Cweb
Dproduction
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong namespace or label keys/values.
Forgetting the '=' between label key and value.