# Get output from running 'date' from pod <pod-name>. By default, output is from the first container. kubectl exec <pod-name> -- date # Get output from running 'date' in container <container-name> of pod <pod-name>. kubectl exec <pod-name> -c <container-name> -- date # Get an interactive TTY and run /bin/bash from pod <pod-name>. By default, output is from the first container. kubectl exec -ti <pod-name> -- /bin/bash