Here is my analysis on Docker Swarm and Kubernetes
 

Why use Containers?

Containers are isolated process groups sharing a single OS, while VMS are different OS running on the same hardware.
Containers have the following characteristics:
  • Isolated processes
  • User isolation
  • Application lib / binary isolation
  • Network Isolation
  • Memory limitations can be defined
  • Disk IO by shared volume with host

What is Container Orchestration?

When running applications within container there are various operation aspects to manage, such as
  • Lifecycle of the containers from creation to destruction
  • Compute & storage resources underneath the container OS
  • Networking between containers
  • Maintenance like scale-up, scale-down , Monitoring, logging etc.
 be902677-6281-4f96-be0d-a5bbeeeb391f

Kubernetes & Docker Swarm 

Recently I was looking at Docker Swarm ( released from Docker last month ) & got compelled to compare it with Kubernetes.  It is surprising in many ways, that Kubernetes was not a product from Docker. But now that Docker have released Docker Swarm  – it is obviously overlapping with Cloud Foundry Diego or Kubernetes type of container orchestration engines.
Considerations
Kubernetes
Docker Swarm
Adoption and Maturity
Kubernetes is much ahead with adoption from major companies like RedHat for OpenShit, Rackspace for Solum.
Google cloud platform and AWS also has seen Kubernetes deployments. It is a standard offering.
The product is also quite active in git hub and has been updating frequently.
Docker swarm is relatively new.
Also the code frequency is not as massive as kubernetes.
bb8ab740-38e7-444f-8691-f3c2812d7d73
57d94cd9-b2e3-4d31-aa38-e244b472319f
Deployment Environment
Kubernetes readily installs on virtually everything starting from bare Linux OS to Docker or Vagrant or Cloud or Mesos.
Docker swarm manager can run on linux.
Installation on anything else will have to be done following the installation steps.
Features
Kubernetes is feature reach, for now:
  • A visual dashboard UI
  • Ability to autoscale
  • having its own management of persistent volumes
All of these can be achieved in docker swarm as well. However, as of now these are not straight out of the box features in Docker Swarm.

When Kubernetes is Better

  • Persistent Volumes feature in Kubernetes allows having the compute nodes just for running the containers and allocate persistent volumes to the containers from a separate pull of persistent volumes. This is a more scalable, manageable and cleaner architecture.
  • Load balancing, Auto-scaling features are now declaratively available in Kubernets without the user having to write any additional script on top.
  • Ability to deploy readily on Google cloud and AWS cloud is great for folks who are already using those platforms.

 Where Docker Swarm Aces 

  • Docker swarm commands are easier to learn if you are familiar with Docker.
  • It is native to docker – hence the architecture is simplified. For example, resource node just has the same docker daemon listening remotely on TCP on swarm mode. In case of Kubernetes there is additional processes, i.e., kubelet that needs to run in each node in addition to docker process.
docker daemon -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock
  • Networking is also docker native. While in kubernetes it creates another layer of networking around the nodes.

What is next?

  • Kubernetes or Swarm, whichever one produces more and more readily available templates for launching common deployment units will see adoption
  • Docker should use its docker-hub registry to create similar registry of docker swarm templates or even kubernetes templates and provide an easy way to launch orchestrated deployment units in AWS, Azure, Docker cloud or Google cloud. Something like an orchestration layer independent of the cloud provider.
  • Sophisticated analytics, monitoring, alerting and anomaly detection capability in a dashboard would be needed soon.
Advertisements