Do you really need Kubernetes (K8s)?

Illustration showing the Docker and Kubernetes logos

Kubernetes is notorious for being complex. While it’s a great program, sometimes the benefits may not outweigh the added complexity, especially for small businesses running simple deployments. Is plain old docker good enough?

What’s great about Kubernetes

Kubernetes (K8s) with Docker are used a lot in professional environments, and this can make it look like an upgraded or more structured version of Docker. While this is true in some ways, it’s not the exact purpose of the K8s.

Kubernetes is a “container formatting system” and it’s important to remember what that means. The Kubernetes dashboard handles all the details of “organizing” containers that will run on any nodes. It separates the hardware from the software and allows your hardware to act as working nodes, which they should ideally be.

Kubernetes is great when you have a large production deployment that needs to be able to scale, fix, and manage itself automatically. When you manage hundreds of containers across many servers, having to deal with load balancing and moving containers from server to server can become a hassle. The K8s addresses this with additional configuration options.

A graphic showing the architecture of a Kubernetes cluster
A graphic showing the architecture of a Kubernetes cluster

Kubernetes also likens Infrastructure as Token (IaC), which is another useful concept. It allows you to control your services using configuration files that can be traced through Git. This can greatly improve deployments by allowing them to be tracked along branches, tested, released, and rolled back if necessary.

Unless Kubernetes is great at it

The main downside to Kubernetes is that it is very complex. This might not be a big deal if you’re already familiar with it, but in any case, it adds extra time and complexity to getting your apps up and running. It is a great tool for learning, and it has a good skill. But it works best for large deployments, and if you’re running a few servers or a few containers, the extra effort of Kubernetes may not be worth it.

Kubernetes is a moderator, but you can always go old school and do the moderator yourself. The nice thing about Docker is that it makes it easy to build and move apps using containers. Creating a new server is relatively simple, and you can have a new EC2 instance of AWS running your container in a matter of minutes.

Without Kubernetes, the only added problem you have is manually running commands on your servers with a file docker CLI or docker-compose API. If you need to add a new container, or move a container to another node, you will need to run these commands again. This can be a problem, for example, if you encounter unexpectedly high traffic and need to run more instances automatically. K8s would solve this problem. But in many cases, your traffic may be relatively constant, or at least predictable on a week-to-week basis, especially for back-end services that don’t really need automatic scaling.

Basically, Docker itself is already improving the process of running portable applications by a significant amount. It’s a huge improvement over having to install apps the old-fashioned way. Kubernetes improves Docker a bit, automates some of the tasks required for large networks, but adds a lot of complexity.

The value of this will depend on the amount of time it actually saves you. If that complexity is acceptable to you and you end up saving time, you should use the K8s, but if it doesn’t, you shouldn’t waste your time using it – especially when you can always switch to it later if needed.

What should you use instead?

It’s a good idea to take a step back and look at what you really think of Kubernetes. If you want to scale your network automatically, manage your resources automatically, and run pods on different servers based on configuration, Kubernetes is a great tool to learn. If you’re concerned about complexity, cloud providers like AWS have them Manage Kubernetes Services like EKSwhich can handle some of the dirty work for you, especially when it comes to administration and provisioning resources.

However, if all you want is a way to manage your containers more easily, or automatically update containers, there are much simpler tools for this task. It may not be quite as featured as Kubernetes, but it will be simpler and can save you time.

If you want to automatically scale certain services, you will always need to talk to the cloud provider’s API to make new resources available. Kubernetes can handle this for you for many platforms, but services like AWS, Azure, and GCP all have simple container services with automatic scaling features. AWS ECS can easily be set up to scale automatically to meet high demand.

Related: How to get started with automatic container deployments on AWS ECS

If you need to auto-update containers whenever you push new versions into the Docker registry, you can use the . file Service like a watchtower. It runs on a node running as the Docker service itself, with Docker socket exposed, and it monitors for changes. Once a new container is pushed, the watchtower will restart the container. This will save you time running container reboots, and is a good alternative to Kubernetes updates.

docker run --detach 
--name watchtower 
--volume /var/run/docker.sock:/var/run/docker.sock 
containrrr/watchtower

If you want to be more organized in general regarding how you manage your containers, you should consider setting up a file GUI to manage docker like Portainer. Portainer is a web-based graphical user interface for managing Docker deployments. It works with multiple working nodes, much like Kubernetes, but lets you handle the task of formatting, setting up containers on the servers you want.

Portainer is really easy to set up since it is packaged as a container itself. If you’d like to learn more, you can read our guide to setting it up and working with it.

Related: How to get started with Portainer, a web user interface for Docker



(Visited 1 times, 1 visits today)

Related posts

Leave a Comment