how to port forward openshift pod with all of its ports?

11/28/2019

I'm using openshift port-forward to connect to a remote pod containing a few services.
How can I port forward all of the pod's ports to my machine?

-- natdev
kubernetes
openshift
portforwarding

2 Answers

12/5/2019

openShift supports port forwarding as well. Read this manual. And more explicit example

You can use the CLI to forward one or more local ports to a pod. This allows you to listen on a given or random port locally, and have data forwarded to and from given ports in the pod. Example:

Use the following command to listen on ports 5000 and 6000 locally and forward data to and from ports 5000 and 6000 in the pod:

$ oc port-forward <pod> 5000:6000

Forwarding from 127.0.0.1:5000 -> 5000
Forwarding from [::1]:5000 -> 5000
Forwarding from 127.0.0.1:6000 -> 6000
Forwarding from [::1]:6000 -> 6000
-- Ivan Vovk
Source: StackOverflow

11/28/2019

You can consider kubefwd. follow the link for more details

https://github.com/txn2/kubefwd

-- P Ekambaram
Source: StackOverflow