There are lots of articles out there which will explain the differences. In a nutshell:
- Both are trying to solve the same problem - container orchestration over a large number of hosts. Essentially these problems can be broken down like so:
- Scheduling containers across multiple hosts (taking into account resource utilization etc)
- Grouping containers into logical units
- Scaling of containers
- Load balancing/access to these containers once they're deployed
- Attaching storage to the containers, whether it be shared or not
- Communication/networking between the containers/grouped containers
- Service discovery of the containers (ie where is X service)
Both Kubernetes & Docker Swarm can solve these problems for you, but they have different naming conventions and ideas on how to solve them. The differences are relatively conceptual. There are articles that break this down quite well:
https://platform9.com/blog/compare-kubernetes-vs-docker-swarm/ https://torusware.com/blog/2016/09/hands-on-orchestration-docker-1-12-swarm-vs-kubernetes/ http://containerjournal.com/2016/04/07/kubernetes-vs-swarm-container-orchestrator-best/
Essentially, they are similar products in the same space. There are a few caveats to bear in mind though:
- Kubernetes is developed with a container agnostic mindset (at present it supports Docker, rkt and has some support for hyper whereas docker swarm is docker only)
- Kubernetes is "cloud native" in that it can run equally well across Azure, Google Container Engine and AWS - I am not currently aware of this being a feature of Docker Swarm, although you could configure it yourself
- Kubernetes is an entirely open source product. If you require commercial support, you need to go to a third party to get it. Docker provides enterprise support for Swarm
- If you are familiar with the docker-compose workflow, Docker Swarm makes use of this so it may be familiar to you and easier to get started. Kubernetes requires learning pod/service/deployment definitions which while pure yaml, are an adjustment.