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?
This is what I tried:
# 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
Is this possible at all?
This section in the kubernetes docs suggests that it is indeed possible:
https://kubernetes.io/docs/concepts/services-networking/service/#multi-port-services
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.
Thanks!