Bird
0
0

Which Operator SDK command is used to add a new API resource to an existing operator project?

easy📝 Conceptual Q2 of 15
Kubernetes - Operators and Custom Resources
Which Operator SDK command is used to add a new API resource to an existing operator project?
Aoperator-sdk generate api
Boperator-sdk add api
Coperator-sdk create api
Doperator-sdk init api
Step-by-Step Solution
Solution:
  1. Step 1: Recall Operator SDK commands

    The command to add a new API resource is 'operator-sdk create api' which scaffolds the API and controller code.
  2. Step 2: Eliminate incorrect options

    'add api' and 'generate api' are not valid commands; 'init api' is incorrect as 'init' initializes a project.
  3. Final Answer:

    operator-sdk create api -> Option C
  4. Quick Check:

    Add API resource command = create api [OK]
Quick Trick: Use 'create api' to add new resources in Operator SDK [OK]
Common Mistakes:
  • Confusing 'init' with adding APIs
  • Using non-existent commands like 'add api'
  • Mixing generate and create commands

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes