3 ms·
> (Kubernetes is not a suitable alternative to Docker Compose, before someone suggests it.) Why not? I have been contemplating this exact thing right before I
by kozikow 10y ago
> (Kubernetes is not a suitable alternative to Docker Compose, before someone suggests it.)
Why not? I have been contemplating this exact thing right before I came to procrastinate on HN.
A few of my local development workflows are using minikube[1]. Kubernetes within minikube is a lot like docker-compose. The only use case I have for docker-compose is pycharm integraion[2], but someone will probably make it work with minikube one day. There is a tool to convert from docker-compose to kubernetes[3].
1. https://github.com/kubernetes/minikube
2. https://www.jetbrains.com/help/pycharm/2016.1/docker-compose.html
3. https://github.com/kelseyhightower/compose2kube
- Perceptes 10y agoIt has the technical capability to do what Compose does, but Compose is a tool specifically designed for development workflow, and this is not the case for Kubernetes. Application developers without any infrastructure/operations experience can have a tough time understanding and learning all this new technology, and to have to get a mental model of Kubernetes to do their work is a big barrier. One simple example is that there is no direct equivalent of `docker-compose restart` in Kubernetes. The only way to restart a pod is to remove it and recreate it (or scale an RC/RS/deployment to zero and back up to force recreation.) It may just be a couple commands more, but it's unnecessary cognitive load for many app devs. Even just comparing a Docker Compose manifest file to a Kubernetes manifest file, it's more verbose because Kubernetes is more powerful and needs more details specified.
- kozikow 10y ago> It may just be a couple commands more, but it's unnecessary cognitive load for many app devs. My general approach (not only to interacting with k8s) is to create fabric files with list of commands that makes sense in given place. I've seen people do similar things with Makefiles. You would type "fab -l" and see list of commands, including "restart_pods" with the docstring describing what it means. Or even broader command for "rebuild and restart". Not only it helps me as I get auto completion (https://gist.github.com/Fandekasp/1522827 https://gist.github.com/Fandekasp/1522827), but also others can get things done without understanding all the details. And it's easier to migrate everyone to use slightly different command, e.g. add a flag.
- deleted 10y ago[deleted]