Skip to content

Instantly share code, notes, and snippets.

@se7enack
Created February 13, 2026 22:24
Show Gist options
  • Select an option

  • Save se7enack/7fc5adb93aff035ef3a69d63c1c477e3 to your computer and use it in GitHub Desktop.

Select an option

Save se7enack/7fc5adb93aff035ef3a69d63c1c477e3 to your computer and use it in GitHub Desktop.
whatowns() {
[ -z "$1" ] || [ -z "$2" ] && return 0
kubectl get pod "$1" -n "$2" \
-o jsonpath='{.metadata.ownerReferences[0].kind}{" / "}{.metadata.ownerReferences[0].name}{"\n"}' \
2>/dev/null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment