Bird
0
0

You created a ServiceAccount but your pod fails to use it. Which of these is the most likely cause?

medium📝 Troubleshoot Q14 of 15
Kubernetes - RBAC and Security
You created a ServiceAccount but your pod fails to use it. Which of these is the most likely cause?
AThe ServiceAccount was created in a different namespace
BThe pod image is missing
CThe ServiceAccount has no secrets linked
DThe pod spec does not specify the ServiceAccount name
Step-by-Step Solution
Solution:
  1. Step 1: Check namespace consistency

    ServiceAccounts are namespace-scoped. If the pod is in one namespace but the ServiceAccount in another, the pod cannot use it.
  2. Step 2: Verify pod spec and ServiceAccount existence

    Even if the ServiceAccount exists in the same namespace, the pod must specify the ServiceAccount name in its spec to use it.
  3. Final Answer:

    The pod spec does not specify the ServiceAccount name -> Option D
  4. Quick Check:

    Pod spec must specify serviceAccountName to use it [OK]
Quick Trick: Pod spec must specify serviceAccountName [OK]
Common Mistakes:
  • Forgetting to specify serviceAccountName in pod spec
  • Assuming missing secrets cause pod failure
  • Blaming pod image unrelated to ServiceAccount

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes