Skip to content

Instantly share code, notes, and snippets.

@alexlopes
Created June 10, 2021 12:20
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 alexlopes/0c225c0a9a6ea68c1c9ff0b9e254e581 to your computer and use it in GitHub Desktop.
Save alexlopes/0c225c0a9a6ea68c1c9ff0b9e254e581 to your computer and use it in GitHub Desktop.
K8s Tricks

Get Pods by Owner name

kubectl get pods -o jsonpath='{range .items[?(@.metadata.ownerReferences[0].name == "owner name")]}{.metadata.name}{"\n"}{end}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment