I'm new to kubernetes and am wondering if there's a way for me to see a list of all currently configured port forwards using kubectl
?
I see there's a kubectl port-forward
command, but it doesn't seem to list them, just set one up.
kubectl get svc --all-namespaces -o go-template='{{range .items}}{{range.spec.ports}}{{if .nodePort}}{{.nodePort}}{{"\n"}}{{end}}{{end}}{{end}}'
Port forwards are listed in the services the above command should loop through all of them and print them out