<p>I am trying to run my custom marklogic image on my local minkube cluster. Marklogic exposes multiple different ports for management (8001) and for querying (8000). Is there a way to expose multiple ports of a container on kubernetes?</p>

<p>This is what I tried: </p>

<pre><code># try to run container with multiple ports exposed. 
kubectl run ml3 --image=marklogic-initial-install:9.0-3.1 --port=8001 --port 8002
# create service to expose the container
kubectl expose deployment ml3 --type=LoadBalancer
# use qinikube to open the exposed ports 
minikube service ml3
</code></pre>

<p>Is this possible at all?</p>

<p>This section in the kubernetes docs suggests that it is indeed possible: </p>

<p><a href="https://kubernetes.io/docs/concepts/services-networking/service/#multi-port-services" rel="noreferrer">https://kubernetes.io/docs/concepts/services-networking/service/#multi-port-services</a></p>

<p>But it only talks about how to configure services to expose multiple ports, it does not say how to achieve this for containers -- which should be a prerequisite. </p>

<p>Thanks!</p>

<p>With <code>kubectl expose</code>, you can specify multiple ports by separating them with commas:</p>

<pre><code>    --port=8001,8002
</code></pre>
