DEV Community

loading...

Do you really need Docker or Kubernetes in your system?

inductor profile image Kohei Ota Updated on ・3 min read

Abstract

From several years ago, Docker has given us the very strong ecosystem that makes your code work on pretty much everywhere with the essential components in one minimized unit just like a physical "container".

As for Kubernetes, it gave a very congregative platform not just for the operating environment integrated with the containerized system based on what Docker created, but also with logging, monitoring and so on.

Moreover, the concept of DevOps and SRE have become very important to understand how to operate your system in the modern Internet world to reflect your business demand and updates continuously.

But here's a question. Do you really need Docker and its ecosystem, or Kubernetes in your system environment?

Yes, I am asking you, not anybody else. When you decide what technology to use in your system, you have to understand why it matters and how.

Here are some thoughts of mine for what you should do with containers and what you shouldn't. Please give me your opinions in the comment section if you have :)

1. Docker itself is not "production ready".

First of all, Docker is a great platform in many ways. But it triggers a lot of pains especially with Networking, Monitoring and Logging.
It is simply because Docker was created in order to deal with the App execution environment as mentioned above as dotCloud was a PaaS like Heroku.

It is very easy to handle a single container as one service but you don't really use it as a whole platform. You will need a Web server(or more than that), a Database server, an Application server, and maybe Memcached/RabbitMQ etc...

Combining those with Docker itself is not that hard, but you can't do clustering, self-healing, replicating because they are not natively provided Docker which is required on system platform in most cases.

2. Kubernetes is too much for just a web application

So, I mentioned that Docker is too less for a production platform in the previous section. Kubernetes and Docker Swarm solves a lot of those problems.
They both have, in common, clustering, scaling and networking. Kubernetes has more features and it looks good. Yes it does. But it's actually too much for just a single web application. The more you use Kubernetes features, the more complicated it becomes. I have seen lots of people saying this "I just wanted to orchestrate container system smartly. But now I am maintaining the Kubernetes clusters, master node, and etcd everyday." It's a well architected for complicated systems and to keep it available. But do you really need the complexity? I'd say no.(though it really depends!)

There are lots of products that's on the Kubernetes such as Rancher/OpenShift but none of them would decrease the operation costs for the "features" of Kubernetes to me.(No offence. They are very good tools as well!)

3. Docker Swarm is good but...

OK, tell me I'm wrong. I haven't used Swarm much, honestly.

Anyway, meanwhile Kubernetes is too much, Docker Swarm is lighter and it looks the best to deal with smaller applications. The performance is actually much faster than Kubernetes as well!

The thing that made me stop to think is that I want to use container orchestration tools for less operations in the beginning. While Kubernetes is supported by lots of cloud benders, Docker Swarm is not. Technically they have tried but not anymore.
It is not very convenient because I, personally, don't really want to use EC2 or any physical machine to manage clusters and stuff. Only if I could make clusters Swarm easily on AWS.... that'd be legendary!
Oh and as another thing for me, I'm Japanese and lots of people want Japanese language support for Enterprise solution and Swarm doesn't have it as long as I know.

Summary

The TL;DR is super boring. Know what you are using. New things are cool but it's not perfect and you always have to try comparing what's good and what's not for you :)

Discussion (9)

pic
Editor guide
Collapse
kr428 profile image
Kristian R.

Well. Yes. Question's valid, and your answer is obvious and true: Know what you are using. And know why you are using it. I've seen several projects the last couple of years which tried best to work "using docker and kubernetes" because everyone does it so it can't be all too wrong, can it? Personal experience, throughout the last two decades of IT in various environments: Your actual enemy is not lack of tools. Your enemy is complexity that gets into your way on many different levels. Adding more tools immediately will add more complexity to wrestle with. You should only do that if these tools clearly solve an actual problem in your environment that can't be solved by easier means. So get your requirements right, evaluate solutions - and then do what needs to be done. Maybe kubernetes and docker are good for your environment. But it's only you and your team who can figure that out. ;)

Collapse
inductor profile image
Kohei Ota Author

@kr428
Thanks and that's a very realistic answer!
It's very important what you need and what you really want to do. These days people are like "Kubernetes is the best" enthusiastically kinda too much to me. I really would like to step back a bit and think if this is a really good answer. Knowing pros and cons, especially cons, and comparing other possibility take more time and boring but you cannot avoid it.

Collapse
david_j_eddy profile image
David J Eddy

Nice article inductor and good point. Many people want to use the new and hot tech but do not consider the trades offs. Docker and K8 are tools used to fix a problem, not a band-aid for every problem.

Right tool => Right job.

Collapse
birdayz profile image
Johannes Brüderl

You dont have to maintain the Cluster yourself, use a managed one e.g. GKE.

Collapse
inductor profile image
Kohei Ota Author

@birdayz yeah I know :)
The point is that if you really need kubernetes, or you just wanna use it just cause it looks cool 🤓

Collapse
birdayz profile image
Johannes Brüderl

It is not just this or that. There is something between "it just looks cool" and "i really need it". Many people are very productive with k8s and its tooling, so there is little overhead to it.

Collapse
joehobot profile image
Joe Hobot

Or EKS.

Collapse
inductor profile image
Kohei Ota Author

EKS is not bad but you still need to maintain the master node

Thread Thread
joehobot profile image
Joe Hobot

You mean the worker nodes?