0
0
Kubernetesdevops~10 mins

Why kubectl mastery matters in Kubernetes - Test Your Understanding

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

Complete the command to list all pods in the current namespace.

Kubernetes
kubectl get [1]
Drag options to blanks, or click blank then click option'
Aservices
Bpods
Cnodes
Ddeployments
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'kubectl get nodes' lists nodes, not pods.
Using 'kubectl get services' lists services, not pods.
2fill in blank
medium

Complete the command to describe a pod named 'web-server'.

Kubernetes
kubectl [1] pod web-server
Drag options to blanks, or click blank then click option'
Adescribe
Bdelete
Clist
Dcreate
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'kubectl list' which is not a valid command.
Using 'kubectl delete' which removes the pod.
3fill in blank
hard

Fix the error in the command to scale a deployment named 'frontend' to 3 replicas.

Kubernetes
kubectl scale deployment frontend --replicas=[1]
Drag options to blanks, or click blank then click option'
Atwo
Bzero
C-3
D3
Attempts:
3 left
💡 Hint
Common Mistakes
Using words like 'two' or 'zero' instead of numbers.
Using negative numbers which are invalid.
4fill in blank
hard

Fill both blanks to create a pod manifest file named 'pod.yaml' using kubectl.

Kubernetes
kubectl [1] pod nginx --dry-run=client -o [2] > pod.yaml
Drag options to blanks, or click blank then click option'
Acreate
Bapply
Cyaml
Djson
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'apply' instead of 'create' for generating manifests.
Using 'json' output when YAML is preferred for manifests.
5fill in blank
hard

Fill all three blanks to get logs from a pod named 'backend' for container 'app' with 100 lines.

Kubernetes
kubectl logs [1] -c [2] --tail=[3]
Drag options to blanks, or click blank then click option'
Abackend
Bapp
C100
Dfrontend
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong pod or container names.
Omitting the container name when multiple containers exist.