enter into a deployment kubernetes pod code example
Example 1: kubectl exec bash
kubectl exec --stdin --tty shell-demo -- /bin/bash
Example 2: kubectl exec ls -lah
kubectl exec <pod_name> -- ls -la /
kubectl exec --stdin --tty shell-demo -- /bin/bash
kubectl exec <pod_name> -- ls -la /