Skip to content

Instantly share code, notes, and snippets.

@baybatu
Created April 12, 2023 15:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
List all used node ports on kubernetes cluster. kudos @hasansama
kubectl get svc --all-namespaces -o go-template="{{range .items}}{{range.spec.ports}}{{if .nodePort}}{{.nodePort}}{{printf \"\n\"}}{{end}}{{end}}{{end}}" | sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment