Greetings…
To learn Kubernetes, I have gone through the basic tutorial. So got a basic idea. I’m fairly familiar with Docker. What I’m trying to build is a Kubernetes cluster in Minikube on a ubuntu 18.04 laptop, and want to create a service exposed to outside the cluster. The service processes and forwards traffics to a few service containers inside the cluster, including a database.
The service needs to have a volume mounted from the host as a sort of persistent store, and a port exposed. However, I’m confused whether the ‘host’ mean the node, i.e. minikube which is a Docker-Machine in the form of a virtualbox VM, or it means the Ubuntu 18.04 host on which the VM runs. If the former, I would need to share a directory on the real host, as a volume in the virtualbox, and mount this volume further into the service container. Also if NodePort means the port on the node, I would need to further map a port on the real host to this NodePort on the VM, to be further forwarded to the service container port.
I did a lot of reading, but have been unable to clear my above, likely typical newbie confusion. Would a more experienced Kubernetes fellow please kindly clarify these subjects?
Further, should I used a single large yaml file when creating the deployment? Is there a non-trivial example that can serve as a reference?
thanks so much for sharing your insight…
Ben