Complete the command to execute a shell inside a pod named 'my-pod'.
kubectl exec -it my-pod -- [1]The kubectl exec command runs a command inside a pod. To open a shell, you use bash.
Complete the command to run 'ls /app' inside a pod named 'web-server'.
kubectl exec web-server -- [1] /appThe ls command lists files in a directory. Here, it lists files inside /app in the pod.
Fix the error in the command to run 'env' inside a pod named 'db-pod'.
kubectl exec [1] -- envPod names cannot contain spaces or slashes. The correct pod name is db-pod.
Fill both blanks to correctly execute a command inside a pod named 'cache-pod' to print the working directory.
kubectl exec [1] -- [2]
The command pwd prints the current directory inside the pod named cache-pod.
Fill all three blanks to run a shell inside a pod named 'api-pod' and keep the session interactive.
kubectl exec [1] [2] -- [3]
The -it flags keep the session interactive and allocate a terminal. The command bash opens the shell inside the pod api-pod.