Evgenia Rubanova
Evgenia Rubanova

Reputation: 53

Port-forward from OpenShift to Kafka

I did a port-forward for my application on OpenShift with oc port-forward podName 5005.

I also need to port-forward to Kafka (that is running on localhost:9092) but I'm new to OpenShift and don't actually understand how this could be done. What should I put instead of 'podName'and what should the command look like?

Thanks in advance!

Upvotes: 1

Views: 439

Answers (1)

StackOverflow
StackOverflow

Reputation: 146

Try following command:

oc port-forward POD_NAME YOUR_LOCAL_PORT:POD_PORT


Example: Imagine I have a OpenShift cluster which runs a pod with the name postgresABC123 with the open port 5432 and I would like to connect it with my localhost port 9876

On my local maschine which has the oc tool installed I write following command.

-> oc port-forward postgresABC123 9876:5432

Upvotes: 1

Related Questions