0
0
Kubernetesdevops~10 mins

Executing commands in Pods 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 execute a shell inside a pod named 'my-pod'.

Kubernetes
kubectl exec -it my-pod -- [1]
Drag options to blanks, or click blank then click option'
Astart
Brun
Cbash
Dopen
Attempts:
3 left
💡 Hint
Common Mistakes
Using commands like 'run' or 'start' which are not shell commands.
Forgetting the '--' before the command.
2fill in blank
medium

Complete the command to run 'ls /app' inside a pod named 'web-server'.

Kubernetes
kubectl exec web-server -- [1] /app
Drag options to blanks, or click blank then click option'
Als
Bcd
Cpwd
Dcat
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'cd' which changes directory but does not list files.
Using 'pwd' which shows current directory path.
3fill in blank
hard

Fix the error in the command to run 'env' inside a pod named 'db-pod'.

Kubernetes
kubectl exec [1] -- env
Drag options to blanks, or click blank then click option'
Adb-pod
Bdb_pod
Cdb pod
Ddb-pod/
Attempts:
3 left
💡 Hint
Common Mistakes
Using underscores instead of dashes in pod names.
Including spaces or slashes in pod names.
4fill in blank
hard

Fill both blanks to correctly execute a command inside a pod named 'cache-pod' to print the working directory.

Kubernetes
kubectl exec [1] -- [2]
Drag options to blanks, or click blank then click option'
Acache-pod
Bpwd
Cls
Dbash
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'ls' instead of 'pwd' to print the directory.
Using wrong pod names or extra characters.
5fill in blank
hard

Fill all three blanks to run a shell inside a pod named 'api-pod' and keep the session interactive.

Kubernetes
kubectl exec [1] [2] -- [3]
Drag options to blanks, or click blank then click option'
Aapi-pod
B-it
Cbash
D-i
Attempts:
3 left
💡 Hint
Common Mistakes
Using only '-i' without '-t' which may cause no terminal allocation.
Forgetting the '--' before the command.