0
0
Kubernetesdevops~10 mins

kubectl apply vs create in Kubernetes - Interactive Practice

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

Complete the command to create a resource from a file.

Kubernetes
kubectl [1] -f resource.yaml
Drag options to blanks, or click blank then click option'
Adelete
Bapply
Ccreate
Dget
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'apply' instead of 'create' when creating a new resource.
2fill in blank
medium

Complete the command to update or create a resource from a file.

Kubernetes
kubectl [1] -f resource.yaml
Drag options to blanks, or click blank then click option'
Aapply
Bdescribe
Ccreate
Ddelete
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'create' which fails if resource exists.
3fill in blank
hard

Fix the error in the command to update a resource using a file.

Kubernetes
kubectl [1] -f resource.yaml
Drag options to blanks, or click blank then click option'
Acreate
Bapply
Creplace
Dedit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'create' which causes error if resource exists.
4fill in blank
hard

Fill both blanks to create a resource and then update it.

Kubernetes
kubectl [1] -f resource.yaml
kubectl [2] -f resource.yaml
Drag options to blanks, or click blank then click option'
Acreate
Bapply
Cdelete
Dget
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'apply' first which works but is not typical for initial creation.
5fill in blank
hard

Fill all three blanks to explain the difference between create and apply.

Kubernetes
kubectl [1] creates a resource and fails if it [2].
kubectl [3] updates or creates the resource.
Drag options to blanks, or click blank then click option'
Acreate
Bexists
Capply
Ddelete
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing 'delete' with 'create' or 'apply'.