Skip to content

Instantly share code, notes, and snippets.

@sandipchitale
Created January 6, 2023 09:09
Show Gist options
  • Save sandipchitale/f7361eda570ee8281461b6c8a210b3fb to your computer and use it in GitHub Desktop.
Save sandipchitale/f7361eda570ee8281461b6c8a210b3fb to your computer and use it in GitHub Desktop.
kubectl jsonpath containerPort:name #kubectl #jsonpath
kubectl get pods coredns-6d4b75cb6d-2n8kj -o jsonpath="{range .spec.containers[*].ports[*]}{.containerPort}{':'}{.name}{' '}{end}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment