Do You Really Need Kubernetes (K8s)?


Illustration showing the Docker and Kubernetes logos

Kubernetes has a popularity for being difficult. Whereas it’s a incredible piece of software program, typically the advantages might not outweigh the added complexity, particularly for small companies managing easy deployments. Is obvious previous Docker ok?

What Kubernetes Is Nice At

Kubernetes (K8s) is used with Docker fairly often in skilled environments, and this may make it appear to be it’s an upgraded or extra organized model of Docker. Whereas that is true in some regards, it’s not the precise function of K8s.

Kubernetes is a “container orchestration system,” and it’s necessary to recollect what meaning. The Kubernetes Management Aircraft handles all the main points of “orchestrating” which containers will run on which nodes. It separates the {hardware} from the software program and lets your machines simply run as employee nodes, which is ideally all they actually needs to be.

Kubernetes incredible when you might have a big, manufacturing deployment that wants to have the ability to scale, restore, and handle itself routinely. While you’re managing a whole lot of containers throughout many servers, having to take care of load balancing and shifting containers from server to server can get annoying. K8s handles this for you with further configuration choices.

Graphic showing Kubernetes cluster architecture
Graphic exhibiting Kubernetes cluster structure

Kubernetes can be much like infrastructure as code (IaC), one other helpful idea. It helps you to management your providers utilizing configuration information that may be tracked by way of Git. This may drastically enhance your deployment processes by permitting it to be tracked alongside branches, examined, versioned, and rolled again if wanted.

What Kubernetes Isn’t Nice At

The principle draw back of Kubernetes is that it’s notoriously difficult. This may not be an enormous downside if you happen to’re already conversant in it, however in any case, it provides further time and complexity to getting your functions up and working. It’s an awesome instrument to be taught, and a very good talent to have. However it works higher with bigger deployments, and if you happen to’re working just a few servers or a couple of containers, the additional effort of Kubernetes may not be price it.

Kubernetes is a intermediary, however you may all the time go old-school and take the position of orchestrator your self. The good factor about Docker is that it makes the method of making and shifting functions round straightforward with containerization. Creating a brand new server is comparatively easy, and you may have a brand new EC2 occasion from AWS working your container in a way of minutes.

With out Kubernetes, the one added downside you might have is needing to run instructions manually in your servers with the docker CLI or docker-compose API. If you should add a brand new container, or transfer a container to a different node, you’ll have to run these instructions once more. This may be a problem if, for instance, you skilled unexpectedly excessive site visitors and wanted to launch extra situations routinely. K8s would remedy that downside. However in lots of instances, your site visitors could also be comparatively regular, or not less than predicable on a week-to-week foundation, particularly for backend providers that don’t actually need to auto-scale.

Basically, Docker itself already improves the method of working transportable functions by a big quantity. It’s an enormous enchancment over having to put in functions the previous means. Kubernetes improves upon Docker a bit, and automates some duties wanted for large networks, however provides loads of complexity.

The worth of it’s going to rely on how a lot time it really saves you. If this complexity is appropriate to you and finally ends up saving you time, you must use K8s, but when it doesn’t, you shouldn’t waste your time with it—particularly when you may all the time merely swap to it afterward if want be.

What Ought to You Use As a substitute?

It’s good to take a step again and take a look at what you’re actually contemplating Kubernetes for. If you would like your community to auto-scale, handle your assets routinely, and launch pods on totally different servers based mostly on configuration, Kubernetes is a good instrument to be taught. If you happen to’re involved concerning the complexity, cloud suppliers like AWS do have managed Kubernetes providers like EKS, which may deal with among the soiled give you the results you want, particularly with regards to administration and provisioning assets.

Nevertheless, if all you need is a technique to handle your containers extra simply, or auto-update containers, there are far less complicated instruments on the market for the job. They won’t be as absolutely featured as Kubernetes, however they’ll be less complicated and may prevent time.

If you wish to auto-scale sure providers, you’ll virtually all the time must be speaking to a cloud supplier’s API to provision new assets. Kubernetes can deal with this for you for a lot of platforms, however providers like AWS, Azure, and GCP all have easy container providers with auto-scaling options. AWS’s ECS service can simply be set as much as auto-scale to satisfy excessive demand.

RELATED: Tips on how to Get Began with Auto-Scaling Container Deployments on AWS ECS

If you should auto-update containers everytime you push new variations to your Docker registry, you should use a service like Watchtower. It runs on a employee node as a Docker service itself, with the Docker socket uncovered, and watches for adjustments. As soon as a brand new container is pushed, Watchtower will restart the container. It will prevent time working restarts of containers, and is an efficient different to Kubernetes updates.

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

If you wish to be extra organized usually with the way you handle your containers, you must think about organising a Docker administration GUI like Portainer. Portainer is a web-based GUI for managing Docker deployments. It really works with a number of employee nodes, very like Kubernetes, nevertheless it helps you to deal with the job of orchestration, organising containers on the servers you need.


Portainer is very easy to arrange because it’s packaged as a container itself. If you happen to’d wish to be taught extra, you may learn our information to setting it up and dealing with it.

RELATED: Tips on how to Get Began With Portainer, a Internet UI for Docker

Share post:



More like this