Skip to content

Instantly share code, notes, and snippets.

@mowings
Created August 31, 2022 17:30
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 mowings/df16235258271deb0c1ada80091c2b87 to your computer and use it in GitHub Desktop.
Save mowings/df16235258271deb0c1ada80091c2b87 to your computer and use it in GitHub Desktop.
bash function for getting pod logs by prefix (single pod)
# kube get pod logs by pod name
function podlogs() {
k logs -f $(k get pods | grep "$1" | cut -d ' ' -f 1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment