Created
April 12, 2023 15:03
-
-
Save baybatu/793aaabf387333b4343bcf1a2e12f8aa to your computer and use it in GitHub Desktop.
List all used node ports on kubernetes cluster. kudos @hasansama
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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