Bird
0
0

What is the correct command to initialize a new Operator SDK project using Go modules?

easy📝 Syntax Q3 of 15
Kubernetes - Operators and Custom Resources
What is the correct command to initialize a new Operator SDK project using Go modules?
Aoperator-sdk init --domain=example.com --repo=github.com/example/memcached-operator
Boperator-sdk create api --group=cache --version=v1 --kind=Memcached
Coperator-sdk generate k8s
Doperator-sdk run --local
Step-by-Step Solution
Solution:
  1. Step 1: Identify initialization command

    The operator-sdk init command initializes a new operator project, specifying domain and repository.
  2. Step 2: Review other options

    operator-sdk create api --group=cache --version=v1 --kind=Memcached creates an API resource, C generates code, and D runs the operator locally; none initialize the project.
  3. Final Answer:

    operator-sdk init --domain=example.com --repo=github.com/example/memcached-operator -> Option A
  4. Quick Check:

    Initialization uses operator-sdk init with domain and repo [OK]
Quick Trick: Use 'operator-sdk init' with domain and repo to start [OK]
Common Mistakes:
  • Using 'create api' instead of 'init' to start project
  • Confusing generate commands with initialization
  • Omitting required flags like --domain or --repo

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes