Bird
0
0

Which of the following is the correct syntax to define an ExternalSecret resource in Kubernetes?

easy📝 Configuration Q12 of 15
Kubernetes - Secrets
Which of the following is the correct syntax to define an ExternalSecret resource in Kubernetes?
AapiVersion: external-secrets.io/v1alpha1 kind: ExternalSecret metadata: name: my-secret spec: refreshInterval: 1h secretStoreRef: name: my-store target: name: synced-secret data: - secretKey: password remoteRef: key: prod/db-password
BapiVersion: v1 kind: Secret metadata: name: my-secret stringData: password: prod/db-password
CapiVersion: apps/v1 kind: Deployment metadata: name: secret-deployment spec: replicas: 1
DapiVersion: external-secrets.io/v1 kind: SecretStore metadata: name: my-secret-store
Step-by-Step Solution
Solution:
  1. Step 1: Identify ExternalSecret resource structure

    ExternalSecret uses apiVersion external-secrets.io/v1alpha1, kind ExternalSecret, and spec with secretStoreRef and data fields.
  2. Step 2: Match syntax with options

    apiVersion: external-secrets.io/v1alpha1 kind: ExternalSecret metadata: name: my-secret spec: refreshInterval: 1h secretStoreRef: name: my-store target: name: synced-secret data: - secretKey: password remoteRef: key: prod/db-password matches the correct syntax for ExternalSecret resource definition including refreshInterval, secretStoreRef, and data mapping.
  3. Final Answer:

    Correct ExternalSecret resource syntax -> Option A
  4. Quick Check:

    ExternalSecret syntax = apiVersion: external-secrets.io/v1alpha1 kind: ExternalSecret metadata: name: my-secret spec: refreshInterval: 1h secretStoreRef: name: my-store target: name: synced-secret data: - secretKey: password remoteRef: key: prod/db-password [OK]
Quick Trick: Look for apiVersion external-secrets.io and kind ExternalSecret [OK]
Common Mistakes:
  • Using Secret kind instead of ExternalSecret
  • Confusing SecretStore with ExternalSecret
  • Wrong apiVersion or missing spec fields

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes