I am trying to understand how development is done efficiently with dockerized applications, specifically on Kubernetes. I am struggling to find the proper way to go about live editing containers.
In the past with Docker, I would just use something like Nodemon to watch for files to change locally and then when I had the app finished, I would dockerize it and deploy. With Kubernetes (minikube) my first impression is that I'm supposed to rebuild the container with each edit. Surely this cannot be the way people develop on here - what am I missing? Am I supposed to edit locally and then dockerize->k8s deploy? That doesnt seem right.
I am looking for a way to sync all my local changes to a docker container which then reboots the kubernetes pod with the new changes, so I can read from the logs during development. If this is odd, please recommend me a superior way.
Thanks
The kubecluster running inside the minikube vm actually uses Docker to run all the containers. So when you create kubernetes objects, e.g. pods, then you can use the docker cli to view the underlying containers that have been created.
Does Minikube require Docker? A Docker daemon is included with Minikube, so you don't need to install it separately.
You can run minikube in docker in docker container. It will use docker driver.
minikube's primary goal is to quickly set up local Kubernetes clusters, and therefore we strongly discourage using minikube in production or for listening to remote traffic. By design, minikube is meant to only listen on the local network. However, it is possible to configure minikube to listen on a remote network.
Kubernetes is a container orchestration tool. It's not a development platform. It's designed to ease the deployment of hundreds of containers, and deal with lifecycle/networking/storage issues.
If you're developing your application, you really don't need kubernetes/minikube at the moment. My suggested workflow would be:
The benefit of using Docker is that it will deploy exactly the same on your local laptop, as well as to a production k8s cluster, so once you've arrived at the stage where you're ready to tag/push images, you can be assured the deployment process will be exactly the same.
Minikube isn't for local development, it's for people to test out kubernetes locally, and possibly develop kubernetes itself, it's not designed as a vagrant alternative.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With