0
0
Kubernetesdevops~10 mins

Deleting Pods 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 delete a pod named 'my-pod'.

Kubernetes
kubectl delete pod [1]
Drag options to blanks, or click blank then click option'
Amy-pod
Bpods
Cdelete
Dpod-name
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pods' instead of the pod name.
Using 'delete' as the pod name.
Using a generic term like 'pod-name' instead of the actual pod name.
2fill in blank
medium

Complete the command to delete all pods with the label 'app=nginx'.

Kubernetes
kubectl delete pods -l [1]
Drag options to blanks, or click blank then click option'
Aname=nginx
Bapp=nginx
Capp:nginx
Dlabel=nginx
Attempts:
3 left
💡 Hint
Common Mistakes
Using ':' instead of '=' in the label selector.
Using incorrect label keys like 'name' or 'label'.
3fill in blank
hard

Fix the error in the command to force delete a pod named 'temp-pod'.

Kubernetes
kubectl delete pod [1] --force --grace-period=0
Drag options to blanks, or click blank then click option'
Atemp_pod
B--force
Ctemp-pod --force
Dtemp-pod
Attempts:
3 left
💡 Hint
Common Mistakes
Including flags as part of the pod name.
Using underscores instead of hyphens in the pod name.
4fill in blank
hard

Fill both blanks to delete pods in the 'default' namespace with label 'tier=backend'.

Kubernetes
kubectl delete pods -n [1] -l [2]
Drag options to blanks, or click blank then click option'
Adefault
Bkube-system
Ctier=backend
Dapp=frontend
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong namespace like 'kube-system'.
Using incorrect label selectors.
5fill in blank
hard

Fill all three blanks to delete pods with label 'env=prod' in namespace 'staging' and wait for completion.

Kubernetes
kubectl delete pods -n [1] -l [2] --wait=[3]
Drag options to blanks, or click blank then click option'
Astaging
Benv=prod
Ctrue
Dfalse
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong namespace or label selector.
Setting '--wait' to 'false' when waiting is needed.