Is there anyway to get the external ports of the kubernetes cluster

kubectl get svc --all-namespaces -o go-template="{{range .items}}{{range.spec.ports}}{{if .nodePort}}{{.nodePort}}{{"\n"}}{{end}}{{end}}{{end}}"

This gets all services in all namespaces, and does basically: “for each service, for each port, if nodePort is defined, print nodePort”.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)