Bird
0
0

What will happen if you try to create a Custom Resource instance before its CustomResourceDefinition is applied?

medium📝 Command Output Q5 of 15
Kubernetes - Operators and Custom Resources
What will happen if you try to create a Custom Resource instance before its CustomResourceDefinition is applied?
AThe resource will be created successfully
Bkubectl will return an error saying the resource type is unknown
CThe resource will be created but ignored by Kubernetes
DThe resource will be created as a Pod
Step-by-Step Solution
Solution:
  1. Step 1: Understand dependency on CRD

    Kubernetes must know the resource type from the CRD before creating instances.
  2. Step 2: Predict behavior without CRD

    Without CRD, kubectl does not recognize the resource type and returns an error.
  3. Final Answer:

    kubectl will return an error saying the resource type is unknown -> Option B
  4. Quick Check:

    Create resource before CRD = error unknown resource [OK]
Quick Trick: Always apply CRD before creating custom resource instances [OK]
Common Mistakes:
  • Assuming resource creates without CRD
  • Thinking resource defaults to Pod type

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes