Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is Docker Swarm different than Kubernetes?

I am finding docker swarm, kubernetes quite similar and then there is docker which is a company and the above two are docker clustering tool. So what exactly all these tools are and differences between them?

like image 814
Abhay Dwivedi Avatar asked Nov 28 '16 12:11

Abhay Dwivedi


People also ask

What is unique about Docker Swarm?

Docker swarm is a container orchestration tool, meaning that it allows the user to manage multiple containers deployed across multiple host machines. One of the key benefits associated with the operation of a docker swarm is the high level of availability offered for applications.

What are the differences between Docker and Kubernetes?

In a nutshell, Docker is a suite of software development tools for creating, sharing and running individual containers; Kubernetes is a system for operating containerized applications at scale. Think of containers as standardized packaging for microservices with all the needed application code and dependencies inside.

Should I learn Kubernetes or Docker Swarm?

Kubernetes is a complex system. It provides strong cluster state guarantees and unified APIs at the cluster level, making it more difficult to manage scaling behavior. Docker Swarm, at least for inexperienced operators, can be used to deploy and scale containers much faster and easier.


2 Answers

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.
like image 63
jaxxstorm Avatar answered Oct 06 '22 00:10

jaxxstorm


Here is a one to one mapping of docker swarm with the Kubernetes.

Credits: janakiram MSV and the watch the full video here

enter image description here

like image 20
Lakshman Diwaakar Avatar answered Oct 05 '22 22:10

Lakshman Diwaakar