I am fairly new to openshift.
Is there a REST API available to expose a pod ? Basically I am looking to do something like:
kubectl expose pod pod-nameoc exposeJust like in kubectl - expose
As per OpenShift CLI (oc) man
expose
Expose a Service externally as a Route.
Example: Expose a Service
$ oc expose service/parksmap-katacoda
Example: Expose a Service and specify the host name
$ oc expose service/parksmap-katacoda --hostname=www.my-host.com
virtctl exposeAlso, you can use virtctl expose
The
virtctlclient is a command-line utility for managing container-native virtualization resources. The following table contains thevirtctlcommands used throughout the container-native virtualization documentation.
virtctl expose <vm>Create a service that forwards a designated port of a virtual machine or virtual machine instance and expose the service on the specified port of the node.