k8wiz
Kubernetes
Medium
Commands

Which command would you use to delete a pod named 'nginx' immediately without a grace period?

Select your answer:

Show answer and explanation

Answer: kubectl delete pod nginx --grace-period=0 --force

Explanation

The 'kubectl delete pod nginx --grace-period=0 --force' command forcefully and immediately deletes the pod without waiting for the normal graceful termination period. This should be used with caution as it may cause data corruption or unexpected behavior.

Read more about Kubernetes