Skip to content

Instantly share code, notes, and snippets.

@ishikawa
Created June 25, 2020 02:02
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 ishikawa/3f340f1274b3eb384156355665559ed7 to your computer and use it in GitHub Desktop.
Save ishikawa/3f340f1274b3eb384156355665559ed7 to your computer and use it in GitHub Desktop.
Login with the shell into the first matching pod returned from kubectl get pod
kubectl get pod | awk '{ print $1 }' | grep '^gateway-' | head -1 | xargs -o -I {} kubectl exec -it {} -- /bin/bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment