Bird
0
0

What will be the output of the command kubectl get secret mysecret -o jsonpath='{.data.password}' if the password was set as 'mypassword'?

medium📝 Command Output Q4 of 15
Kubernetes - Secrets
What will be the output of the command kubectl get secret mysecret -o jsonpath='{.data.password}' if the password was set as 'mypassword'?
Amypassword
BError: field not found
Cpassword
DbXlwYXNzd29yZA==
Step-by-Step Solution
Solution:
  1. Step 1: Understand Secret data encoding

    Secret data values are stored base64 encoded in Kubernetes.
  2. Step 2: Base64 encode 'mypassword'

    The base64 encoding of 'mypassword' is 'bXlwYXNzd29yZA=='.
  3. Final Answer:

    bXlwYXNzd29yZA== -> Option D
  4. Quick Check:

    Secret data output = base64 encoded value [OK]
Quick Trick: Secret data output is base64 encoded, not plain text [OK]
Common Mistakes:
  • Expecting plain text output
  • Confusing key name with value
  • Incorrect jsonpath usage

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes