Bird
0
0

You want to use ExternalSecret to fetch multiple keys from AWS Secrets Manager and create a Kubernetes Secret with custom key names. Which YAML snippet correctly maps external keys to custom names?

hard📝 Workflow Q8 of 15
Kubernetes - Secrets
You want to use ExternalSecret to fetch multiple keys from AWS Secrets Manager and create a Kubernetes Secret with custom key names. Which YAML snippet correctly maps external keys to custom names?
Aspec: secretStoreRef: name: aws-store data: - key: prod/db-password - key: prod/api-key
Bspec: secretStoreRef: name: aws-store dataFrom: - key: prod/db-password - key: prod/api-key
Cspec: secretStoreRef: name: aws-store data: - name: password - name: apiKey
Dspec: secretStoreRef: name: aws-store data: - key: prod/db-password name: password - key: prod/api-key name: apiKey
Step-by-Step Solution
Solution:
  1. Step 1: Understand data mapping syntax

    Each item in spec.data maps an external key to a Kubernetes Secret key using 'key' and 'name' fields.
  2. Step 2: Validate options

    spec: secretStoreRef: name: aws-store data: - key: prod/db-password name: password - key: prod/api-key name: apiKey correctly maps 'prod/db-password' to 'password' and 'prod/api-key' to 'apiKey'. Others miss 'name' or use incorrect fields.
  3. Final Answer:

    YAML with spec.data mapping keys to custom names -> Option D
  4. Quick Check:

    Use spec.data with key and name for custom mapping [OK]
Quick Trick: Map external keys to custom names with spec.data key and name [OK]
Common Mistakes:
  • Using dataFrom without custom names
  • Omitting name field in data items
  • Listing only names without keys

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes