I came to this world with very limited knowledge about container, docker, since my expertise is about big data processing frameworks. After playing around with Docker Swarm and Kubernetes for roughly 4 months, I would like to share some first thoughts when learning and using both, as a point of view of a beginner.
There are many container runtime technologies, the most popular one is Docker. At the beginning, I need to use Docker Swarm, a “docker-native clustering system”, so for sure I need to be familiar with docker before using docker swarm.
If you want to create, build your docker image and run your container, it’s pretty much easy and quick. When you get familiar with basic Docker, you should think about performance and optimization within your containers.
Building a swarm cluster is simple and straightforward with swarm-mode but it is not with standalone swarm. It’s even a bit tricky for me since I was only able to setup a swarm cluster on only one virtual machine, without virtualization feature enabled. I will talk about this problem in another post when I have time.
After 2 months working with Docker Swarm, I moved to Kubernetes, “a system for automating deployment, scaling, and management of containerized applications”. On the other hand, Kubernetes supports many container runtime technologies. In my case, I work with Docker again, so, thanks to my last two months working on Docker and Docker Swarm, it helped me to go faster with Kubernetes.
Working with Docker Swarm helped me to have some reflections when I moved to Kubernetes. Kubernetes has many new concepts and my suggestion is you should read its documentaion carefully. However, the documentation of Kubernetes, in my opinion, is not well-written in compare to Docker Swarm. The Kubernetes’ documentation is still fragmented and in developing. I was also in trouble when deploying a Kubernetes cluster, due to the lack of information.
One more thing which made me excited with Kubernetes is its dashboard, a powerful tool for managing your applications on Kubernetes and the cluster itself.
When I eventually got used to Kubernetes, I liked it and found out that it is very interesting and more powerful than Docker Swarm in some aspects (auto-scaling, storage, logging and monitoring…). Anyway, Docker Swarm is eventually catching up with Kubernetes with new releases.
So, what do you need to take away?
- Docker Swarm supports only Docker while Kubernetes support many container runtime technologies. You could get benefits from being familiar with docker and docker swarm before using Kubernetes.
- Docker Swarm is very easy and simple to deploy and to use, in contrast, it’s complicated to deploy and to use Kubernetes. Anyway, it could be worth to suffer the pain when learning and using Kubernetes in some cases.
- Hopefully I could have a chance to work on Mesos so I could have a bigger picture and better insights among those three frameworks.
- Setup a docker swarm “cluster” on single node with no virtualization support, and better comparison between Kubernetes and Docker Swarm are on the queue for my next posts.