Recall & Review
beginner
What command is used to delete a pod in Kubernetes?
The command
kubectl delete pod <pod-name> is used to delete a pod.Click to reveal answer
beginner
What happens to a pod when you delete it in Kubernetes?
The pod is terminated and removed from the cluster. Any running containers inside the pod stop.
Click to reveal answer
intermediate
How can you delete multiple pods at once?
You can delete multiple pods by specifying a label selector:
kubectl delete pods -l <label-selector>.Click to reveal answer
intermediate
What option forces immediate deletion of a pod without waiting for graceful shutdown?
Use
kubectl delete pod <pod-name> --grace-period=0 --force to force immediate deletion.Click to reveal answer
intermediate
Why might a pod be recreated automatically after deletion?
If the pod is managed by a controller like a Deployment or ReplicaSet, it will recreate the pod to maintain the desired state.
Click to reveal answer
Which command deletes a pod named 'web-server'?
✗ Incorrect
The correct command to delete a pod is
kubectl delete pod <pod-name>.What does the --force flag do when deleting a pod?
✗ Incorrect
The --force flag forces immediate deletion of the pod without waiting for graceful shutdown.
How can you delete all pods with the label app=frontend?
✗ Incorrect
Use
kubectl delete pods -l <label-selector> to delete pods by label.What happens if you delete a pod managed by a Deployment?
✗ Incorrect
Controllers like Deployments keep the desired number of pods and recreate deleted pods.
Which command deletes a pod immediately without waiting for graceful shutdown?
✗ Incorrect
Using
--grace-period=0 --force forces immediate pod deletion.Explain how to delete a pod in Kubernetes and what happens after deletion.
Think about the command and the pod lifecycle.
You got /4 concepts.
Describe how to delete multiple pods using labels and why this might be useful.
Labels help group pods for easy management.
You got /4 concepts.