Bird
0
0

You want to create a custom resource that is namespaced and supports multiple versions. Which fields must you set in the CRD spec?

hard📝 Workflow Q8 of 15
Kubernetes - Operators and Custom Resources
You want to create a custom resource that is namespaced and supports multiple versions. Which fields must you set in the CRD spec?
Aspec.scope: Cluster and spec.version with a single entry
Bspec.scope: Namespaced and spec.versions with multiple entries
Cmetadata.namespace and spec.names.kind only
Dspec.names.plural and spec.names.singular only
Step-by-Step Solution
Solution:
  1. Step 1: Determine scope for namespaced resource

    Set spec.scope to "Namespaced" to limit resource to namespaces.
  2. Step 2: Define multiple versions

    Use spec.versions with multiple version entries to support versioning.
  3. Final Answer:

    spec.scope: Namespaced and spec.versions with multiple entries -> Option B
  4. Quick Check:

    Namespaced + multi-version = spec.scope + spec.versions [OK]
Quick Trick: Use spec.scope and spec.versions to control resource scope and versions [OK]
Common Mistakes:
  • Setting scope to Cluster for namespaced resource
  • Using spec.version singular instead of spec.versions array

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes