Docker swarm vs kubernetes 2017
However it also demonstrates some of the power of Kubernetes in that with Kubernetes you have much more control over aspects of of your deployment and the components that it comprises than Swarm provides. But what can we conclude from this? For one it demonstrates that Docker Swarm brings a bit more simplicity to the table vs Kubernetes. So whats the result? The latter demonstrated getting an app up on both platforms with the same net outcome. Kubernetes kubectl delete -f kubernetes-nginx1.yaml Kubernetes kubectl scale deployment nginx1 -replicas=3ĭocker Swarm docker service rm nginx1_app Launch our app on Docker Swarm as a Service, view and check logsĭocker Service (via stack) docker stack deploy -c swarm-nginx1.yaml nginx1ĭocker service logs -tail 100 -follow $(docker service ps nginx1_app | grep nginx1 | awk '') - /bin/bashįrom within see ENV vars + secret value env | grep SOME_ENV_VARĭocker Swarm curl Kubernetes curl Scale itĭocker Swarm docker service scale nginx1_app=3 Kubectl get secret mynginx-secret -o yaml Kubernetes kubectl create secret generic mynginx-secret -from-file=./secret.txt You’ve done swarm init on your local Docker Prep the NGINX doc root volumes mkdir -p /tmp/k8-nginxdocrootĮcho "k8 nginx" > /tmp/k8-nginxdocroot/index.htmlĮcho "swarm nginx" > /tmp/swarm-nginxdocroot/index.htmlĭocker Secret docker secret create nginx1_secret. You should have Docker for Mac/Windows installed with Kubernetes enabled.ĭO NOT enable the "Deploy Docker Stacks to Kubernetes by Default" option
Published on a fixed high port on all nodes.Kubernetes Deployment named nginx1 available on NodePort 30081Įach app has the following characteristics:.Docker Service named nginx1_app available at published Swarm port: 30080.This article is intended to show how Swarm compares to Kubernetes with a fairly simple example of deploying a replicated application to get you started. So if you are looking to de-couple yourself from the potential future technical debt that Swarm might bring to your team, company or organization your next best bet is Kubernetes. officially to their still sizeable user base utilizing this technology. It would just be nice to hear something from Docker Inc.
One of the lone positive voices comes from a Docker Captain who still advocates for Swarm and has written some good articles on the subject: "Is Swarm Dead" & "The Future of Docker Swarm". to long standing Github issues or Docker forum questions about Swarms future. This is evidenced by the complete lack of responsiveness from anyone at Docker Inc. has any real interest in maintaining or improving.
has, for all practical purposes, abandoned it since their announcement in March of 2018 when they discontinued Docker Cloud and waived the white flag in the container orchestration wars, yielding to Kubernetes.ĭespite seemingly to say otherwise, for all practical purposes, looking at actions and not words, Swarm (in its open-source form) does not appear to be something that Docker Inc. That said, the biggest problem facing Swarm is that Docker Inc. A lot of companies still use it, and it works pretty well for production workloads however for long running clusters you may start to run into some hard to diagnose cluster "state" issues and strange behavior during upgrades (this is based on personal experience) however all in all, its still pretty solid. Docker Swarm is a great orchestration tool for getting into container orchestration platforms and an excellent starting point for simple to moderately complex workloads and app deployment topologies.