Skip to content

Instantly share code, notes, and snippets.

@mikerodionov
Created September 12, 2022 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikerodionov/8c79b1c296781d9fa11e8e500c06186f to your computer and use it in GitHub Desktop.
Save mikerodionov/8c79b1c296781d9fa11e8e500c06186f to your computer and use it in GitHub Desktop.
Connect to a shell of a running container within Kubernetes pod
NS=<NAMESPACE_NAME>
POD_NAME=<POD_NAME>
kubectl exec -n $NS --stdin --tty $POD_NAME -- /bin/sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment