Bird
0
0

You want to create a CRD that supports multiple versions of your custom resource. Which field must you define in the CRD spec?

hard📝 Workflow Q8 of 15
Kubernetes - Operators and Custom Resources
You want to create a CRD that supports multiple versions of your custom resource. Which field must you define in the CRD spec?
Aspec.versions
Bspec.apiVersion
Cspec.version
Dmetadata.versions
Step-by-Step Solution
Solution:
  1. Step 1: Understand versioning in CRDs

    To support multiple versions, you define spec.versions as a list of versions.
  2. Step 2: Check other fields

    spec.apiVersion and spec.version are incorrect; metadata.versions does not exist.
  3. Final Answer:

    spec.versions -> Option A
  4. Quick Check:

    Multiple versions use spec.versions list [OK]
Quick Trick: Use spec.versions to define multiple versions [OK]
Common Mistakes:
  • Using spec.version instead of spec.versions
  • Placing versions under metadata
  • Confusing apiVersion with resource versions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes