Bird
0
0

You want to update a Secret's password without downtime. Which approach is best to ensure Pods use the new Secret value immediately?

hard📝 Workflow Q8 of 15
Kubernetes - Secrets
You want to update a Secret's password without downtime. Which approach is best to ensure Pods use the new Secret value immediately?
AUse 'kubectl apply' to update the Secret and configure Pods to watch for Secret changes
BDelete and recreate the Secret, then restart Pods manually
CEdit the Secret YAML file and apply it, Pods will reload automatically without restart
DCreate a new Secret with a different name and update Pod specs to use it
Step-by-Step Solution
Solution:
  1. Step 1: Understand Secret update methods

    Using 'kubectl apply' updates the Secret safely without deleting it, avoiding downtime.
  2. Step 2: Ensure Pods watch for Secret changes

    Pods configured with projected volumes or environment variables can reload Secrets if configured properly.
  3. Final Answer:

    Use 'kubectl apply' to update the Secret and configure Pods to watch for Secret changes -> Option A
  4. Quick Check:

    Safe Secret update = apply + Pod watch [OK]
Quick Trick: Update Secrets with apply and enable Pod reloads [OK]
Common Mistakes:
  • Deleting Secrets causes downtime
  • Assuming Pods reload Secrets automatically
  • Creating new Secrets requires Pod spec changes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes