0
0
Kubernetesdevops~10 mins

kubectl exec for container access 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 run a shell inside a pod named 'webapp'.

Kubernetes
kubectl exec -it webapp -- [1]
Drag options to blanks, or click blank then click option'
Abash
Bls
Cdocker
Dkubectl
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'ls' instead of a shell command
Trying to run 'docker' inside the pod
2fill in blank
medium

Complete the command to execute 'env' inside the pod named 'backend'.

Kubernetes
kubectl exec backend -- [1]
Drag options to blanks, or click blank then click option'
Abash
Benv
Ckubectl
Dsh
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'bash' or 'sh' when you want to run 'env' directly
3fill in blank
hard

Fix the error in the command to run a shell in the pod 'db' interactively.

Kubernetes
kubectl exec db [1] bash
Drag options to blanks, or click blank then click option'
A-it
B-i
C--it
D-ti
Attempts:
3 left
💡 Hint
Common Mistakes
Using only '-i' or '-ti' which may not work properly
Using '--it' which is invalid
4fill in blank
hard

Fill both blanks to run 'ls /var/log' inside the pod 'app' with interactive terminal.

Kubernetes
kubectl exec [1] app -- [2] /var/log
Drag options to blanks, or click blank then click option'
A-it
Bls
Ccat
D-i
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-i' only or 'cat' instead of 'ls'
5fill in blank
hard

Fill all three blanks to run a shell in the container named 'nginx' inside pod 'webserver'.

Kubernetes
kubectl exec [1] webserver -c [2] -- [3]
Drag options to blanks, or click blank then click option'
A-it
Bnginx
Cbash
Dsh
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'sh' instead of 'bash', missing '-it' flags, or wrong container name