Why port-forward is not working for Virtual Machines in OpenShift Virtualization?

Solution Verified - Updated -

Issue

  • Port forwarding a local port to an OpenShift Virtualization VM is not working. Port was forwarded using the command below to access ssh service running in the VM:
# oc port-forward svc/ssh-service 2222:22

Environment

  • Red Hat OpenShift Virtualization 4.11.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content