0
0
Kubernetesdevops~10 mins

Viewing Pod details and logs 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 view details of a pod named 'webapp'.

Kubernetes
kubectl [1] webapp
Drag options to blanks, or click blank then click option'
Alogs
Bget
Cdescribe
Ddelete
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'kubectl get' only lists pods without detailed info.
Using 'kubectl logs' shows logs, not pod details.
2fill in blank
medium

Complete the command to view logs of a pod named 'backend'.

Kubernetes
kubectl [1] backend
Drag options to blanks, or click blank then click option'
Adescribe
Bget
Cexec
Dlogs
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'kubectl describe' shows details but not logs.
Using 'kubectl exec' runs commands inside the pod, not logs.
3fill in blank
hard

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

Kubernetes
kubectl logs api-server [1]
Drag options to blanks, or click blank then click option'
A-f
B--tail
C-n
D--all
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--tail' only shows last lines but does not follow.
Using '-n' is for namespace, not for following logs.
4fill in blank
hard

Fill both blanks to get logs from the second container in a pod named 'multi-container-pod'.

Kubernetes
kubectl logs multi-container-pod [1] [2]
Drag options to blanks, or click blank then click option'
A-c
Bcontainer-2
C--container
Dcontainer-1
Attempts:
3 left
💡 Hint
Common Mistakes
Not specifying container when pod has multiple containers causes error.
Using wrong container name or flag.
5fill in blank
hard

Fill all three blanks to get the last 100 lines of logs from container 'web' in pod 'frontend' in namespace 'prod'.

Kubernetes
kubectl logs [1] [2] [3] --tail=100
Drag options to blanks, or click blank then click option'
A-n prod
B-c web
Cfrontend
D--namespace=dev
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up namespace or container flags.
Forgetting to specify container when pod has multiple containers.