Bird
0
0

Given a TLS secret named mytlssecret, what will kubectl get secret mytlssecret -o jsonpath='{.data.tls.crt}' output?

medium📝 Command Output Q5 of 15
Kubernetes - Secrets
Given a TLS secret named mytlssecret, what will kubectl get secret mytlssecret -o jsonpath='{.data.tls.crt}' output?
ABase64 encoded TLS certificate data
BPlain text TLS certificate
CError: field not found
DBase64 encoded TLS private key
Step-by-Step Solution
Solution:
  1. Step 1: Understand TLS secret data structure

    TLS secrets store certificate and key in .data["tls.crt"] and .data["tls.key"] fields, base64 encoded.
  2. Step 2: Interpret jsonpath output

    The command extracts the base64 encoded certificate, not plain text or key.
  3. Final Answer:

    Base64 encoded TLS certificate data -> Option A
  4. Quick Check:

    TLS secret .data fields are base64 encoded [OK]
Quick Trick: TLS secret data fields are base64 encoded strings [OK]
Common Mistakes:
  • Expecting plain text certificate output
  • Confusing certificate with private key
  • Using wrong jsonpath field names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes