0
0
Kubernetesdevops~10 mins

Operator SDK basics in Kubernetes - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to create a new operator project using Operator SDK.

Kubernetes
operator-sdk init --domain=[1]
Drag options to blanks, or click blank then click option'
Ainit
Boperator
Cexample.com
Dcreate
Attempts:
3 left
💡 Hint
Common Mistakes
Using command words like 'init' or 'create' instead of a domain name.
2fill in blank
medium

Complete the command to create a new API with group 'app' and version 'v1'.

Kubernetes
operator-sdk create api --group=[1] --version=v1 --kind=AppService
Drag options to blanks, or click blank then click option'
Aapp
Bservice
Cv2
Dcore
Attempts:
3 left
💡 Hint
Common Mistakes
Using version or kind names instead of the group name.
3fill in blank
hard

Fix the error in the command to generate a controller for the kind 'AppService'.

Kubernetes
operator-sdk create controller --kind=[1]
Drag options to blanks, or click blank then click option'
AappService
BAppService
Cappservice
DAppservice
Attempts:
3 left
💡 Hint
Common Mistakes
Using all lowercase or incorrect capitalization for the kind name.
4fill in blank
hard

Fill both blanks to build and push the operator image with the correct image name and tag.

Kubernetes
make docker-build docker-push IMG=[1]:[2]
Drag options to blanks, or click blank then click option'
Aquay.io/myrepo/my-operator
Blatest
Cv0.1.0
Dmy-operator
Attempts:
3 left
💡 Hint
Common Mistakes
Using only the operator name without registry, or using 'latest' tag when a version is expected.
5fill in blank
hard

Fill all three blanks to run the operator locally with the correct image, namespace, and watch namespace.

Kubernetes
operator-sdk run local --image=[1] --namespace=[2] --watch-namespace=[3]
Drag options to blanks, or click blank then click option'
Aquay.io/myrepo/my-operator:v0.1.0
Bdefault
Coperators
Dmy-operator:v0.1.0
Attempts:
3 left
💡 Hint
Common Mistakes
Using incomplete image names or wrong namespaces.