<p>I am fairly new to <code>openshift</code>.</p>

<p>Is there a <code>REST API</code> available to <code>expose</code> a pod ?
Basically I am looking to do something like:</p>

<pre><code>kubectl expose pod pod-name
</code></pre>

dj308
<h2><code>oc expose</code></h2>

<p>Just like in <code>kubectl</code> - <code>expose</code></p>

<p>As per <a href="https://docs.openshift.com/container-platform/4.3/cli_reference/openshift_cli/developer-cli-commands.html#expose" rel="nofollow noreferrer">OpenShift CLI (oc) man</a></p>

<blockquote>
  <h3>expose</h3>
  
  <p>Expose a Service externally as a Route.</p>
  
  <p>Example: Expose a Service</p>
  
  <p>$ oc expose service/parksmap-katacoda</p>
  
  <p>Example: Expose a Service and specify the host name</p>
  
  <p>$ oc expose service/parksmap-katacoda --hostname=www.my-host.com</p>
</blockquote>

<h2><code>virtctl expose</code></h2>

<p>Also, you can use <a href="https://docs.openshift.com/container-platform/4.3/cnv/cnv-using-the-cli-tools.html" rel="nofollow noreferrer"><code>virtctl expose</code></a></p>

<blockquote>
  <p>The <code>virtctl</code> client is a command-line utility for managing container-native virtualization resources. The following table contains the <code>virtctl</code> commands used throughout the container-native virtualization documentation.</p>
  
  <p><code>virtctl expose &lt;vm&gt;</code></p>
  
  <p>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.</p>
</blockquote>
