Bird
0
0

You ran kubectl delete pod my-pod --grace-period=30 but the pod was deleted immediately. What could be the reason?

medium📝 Troubleshoot Q7 of 15
Kubernetes - Pods
You ran kubectl delete pod my-pod --grace-period=30 but the pod was deleted immediately. What could be the reason?
AThe cluster does not support grace periods.
BThe grace period flag was ignored due to syntax error.
CThe pod was already deleted before the command ran.
DThe pod did not handle termination signals and exited immediately.
Step-by-Step Solution
Solution:
  1. Step 1: Understand grace period behavior

    The grace period allows pods to shut down cleanly before deletion.
  2. Step 2: Recognize pod termination handling

    If the pod does not handle termination signals, it may exit immediately ignoring the grace period.
  3. Final Answer:

    The pod did not handle termination signals and exited immediately. -> Option D
  4. Quick Check:

    Pod ignoring grace period = no termination handling [OK]
Quick Trick: Pods must handle termination signals to respect grace period [OK]
Common Mistakes:
  • Assuming syntax error caused immediate deletion
  • Thinking cluster disables grace periods
  • Believing pod was deleted before command

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes