natdev
natdev

Reputation: 567

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

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?

Upvotes: 0

Views: 3134

Answers (2)

Ivan Vovk
Ivan Vovk

Reputation: 1039

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

Upvotes: 0

P Ekambaram
P Ekambaram

Reputation: 17621

You can consider kubefwd. follow the link for more details

https://github.com/txn2/kubefwd

Upvotes: 2

Related Questions