Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
kubectl port-forward should resolve service port to target port #59809
What this PR does / why we need it:
Continues on the work in #59705, this PR adds additional support for looking up targetPort for a service, as well as enable using svc/name to select a pod.
Special notes for your reviewer:
I decided to create pkg/kubectl/util/service_port.go to contain two functions that might be re-usable.