Why would I consider Compose over a tool like Minikube for local development? #145
-
Hello Bret! I've been working through several of your Udemy courses. You go into great detail about how to use Docker Compose for local development. You even mention how compose file version "2" can offer more features for developing over "3" (which I assume that guidance may change with the new Compose). One thing I either missed or you didn't touch on was why pick Compose over a tool like Minikube. I'm a developer -- meaning I have no real sway in DevOps decisions -- but I do know that we deploy our apps to a Kubernetes cluster. However, we use Compose for local development and, to me, it would just make more sense to switch to something that more closely matches production. So my question: why would you consider Compose, over a tool like Minkube, for local development when your production app is deployed to a K8s cluster? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Thanks for the question. Some random thoughts in no specific order:
Note: most teams who use Compose locally and K8s on servers, will have some sort of manifest or Helm repo that can work in most local K8s setups (Docker Desktop, minikube, microk8s), but only for testing a "production-ish setup", and not for development. BTW, yes unless you're using Swarm, drop the |
Beta Was this translation helpful? Give feedback.
-
Interesting! I didn't know this. Leaving a few links in case they'll be helpful for anyone else: TL;DR as of Docker Engine 19.03 and Docker Compose 1.27.0 the compose file uses a new |
Beta Was this translation helpful? Give feedback.
-
@adam-beck Thanks for asking this question, I discovered it today. Based on the answer, for our development workflows I think it makes sense to keep using docker-compose (especially since that is already enough of a learning curve for developers). However, I do see a use-case for some developers to use Kubernetes locally to help create Helm charts and help bridge the dev team -> DevOps gap and their capacity (if it is limited). |
Beta Was this translation helpful? Give feedback.
Thanks for the question. Some random thoughts in no specific order:
run
,ps
,restart
,top
,images
,pause
up/down
, etc.). Kubernetes is a ops tool for managing clusters. To do those same, commands with kubectl you'll usually need additional tools (likestern
for easier log viewing,kubens
for switching namespaces, etc.) and a LOT more complex commands that a pure-dev wouldn't know unless they were a K8s admin. Many of the Compose commands don't even have a k8s equivalent (likedocker compose images
).