kubectl exec -it -n -- example: -------- kubectl exec -it tag-mgmt -n my-namespace -- /bin/sh kubectl exec -it timescaledb -n data-store -- psql timescaledb -> is pod name data-store -> is namespace psql -> is command that we can run for postgres
kubectl exec --stdin --tty shell-demo -- /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
kubectl exec -- ls -la /