Bird
0
0

You created a Secret YAML with this data field:

medium📝 Troubleshoot Q14 of 15
Kubernetes - Secrets
You created a Secret YAML with this data field:
data: apiKey: mysecretkey
What is the problem with this Secret definition?
AThe value 'mysecretkey' is not Base64 encoded
BThe key 'apiKey' is invalid in Secrets
CThe data field should be named stringData
DThe Secret kind is missing
Step-by-Step Solution
Solution:
  1. Step 1: Check the data field requirements

    The data field requires Base64 encoded values, not plain text.
  2. Step 2: Identify the error in the value

    The value 'mysecretkey' is plain text and must be Base64 encoded before placing under data.
  3. Final Answer:

    The value 'mysecretkey' is not Base64 encoded -> Option A
  4. Quick Check:

    data values must be Base64 encoded [OK]
Quick Trick: data field values must be Base64, else error [OK]
Common Mistakes:
  • Putting plain text in data instead of Base64
  • Confusing data with stringData field
  • Ignoring required apiVersion and kind fields

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes