0
0
Kubernetesdevops~10 mins

Pod in CrashLoopBackOff 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 pods in the default namespace.

Kubernetes
kubectl get pods [1]
Drag options to blanks, or click blank then click option'
A--all-namespaces
B--watch
C--namespace=default
D--output=json
Attempts:
3 left
💡 Hint
Common Mistakes
Using --all-namespaces shows pods in all namespaces, not just default.
2fill in blank
medium

Complete the command to describe a pod named 'myapp-pod' to see detailed status.

Kubernetes
kubectl [1] pod myapp-pod
Drag options to blanks, or click blank then click option'
Adescribe
Blogs
Cget
Dexec
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'logs' shows container logs, not pod details.
3fill in blank
hard

Fix the error in the command to get logs from the first container in the pod 'myapp-pod'.

Kubernetes
kubectl logs myapp-pod [1] 0
Drag options to blanks, or click blank then click option'
A-c
B--pod
C--container
D-p
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--container' is valid but requires container name, not index.
4fill in blank
hard

Fill both blanks to create a command that restarts a pod named 'myapp-pod' by deleting it.

Kubernetes
kubectl [1] pod myapp-pod [2]
Drag options to blanks, or click blank then click option'
Adelete
Brestart
C--force
D--grace-period=0
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'restart' is not a valid kubectl command.
5fill in blank
hard

Fill all three blanks to create a command that patches a pod 'myapp-pod' to add an environment variable 'DEBUG' with value 'true'.

Kubernetes
kubectl patch pod myapp-pod -p '{{"spec": [1]' --type=[2] [3]
Drag options to blanks, or click blank then click option'
A{"containers":[{"name":"myapp-container","env":[{"name":"DEBUG","value":"true"}]}]}
Bjson
C--namespace=default
Dmerge
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong patch type or missing namespace option.