kubectl shell into pod code example
Example 1: kubernetes /bin/bash
sudo kubectl -n --context= exec -it /bin/bash
ex:
sudo kubectl -n default --context=staging-devops exec microservice1-jd830k-880 -it /bin/bash
Example 2: kubectl create pod
kubectl run --image= --restart=Never
Example 3: kubectl exec ls -lah
kubectl exec -- ls -la /