Kubernetes is a container orchestrator. But what does that mean in practice? Get the basics in our blog post.
In the global north, some things get taken for granted – running water, say, or ready supplies of olive oil. This unprecedented level of availability is only possible thanks to an intricate infrastructure behind the scenes.
The same is true for the availability of the internet. Imagine a day without high uptime. Meetings would be cancelled. Stock markets would be put on hold. The season finale of your favourite show would simply have to wait.
Yes, high internet availability is now widely considered to be a given. But how is it possible?
There's no single answer to the question. But one cog in the global machine that makes high uptime possible is Kubernetes.
Kubernetes – pronounced "coober-netties" and sometimes shortened to "K8S" – is a way of managing containerised workloads. It's scalable, resilient and versatile.
It's also pretty darn complex. As with many areas of cloud technology, an inquisitive soul might begin reading an article on Kubernetes and within sentences find themselves lost in a labyrinth of jargon.
Well, we're here to help. In this article, we break down Kubernetes – what it is, what it does, and why it matters.
What is Kubernetes?
Google Cloud
defines Kubernetes as "a portable, extensible, open-source platform for managing containerised workloads and services, that facilitates both declarative configuration and automation, letting you run distributed systems resiliently, with scaling and failover for your application".
So far, so cryptic. Let's pick out the key phrase: "managing containerised workloads and services". Kubernetes is a platform that lets app developers ensure containers are in the right place and working together.
It takes multiple virtual machines – or, on occasion, physical machines – and combines them into a unified API surface. A developer can then interact with this single surface without paying much attention to the machines below.
How is an application like an orchestra?
A symphony orchestra has somewhere between 80 and 100 players. So how do they all play together in harmony? The answer is the conductor.
That person on the podium waving a stick is crucial to the smooth running of the orchestra. She sets the tempo, brings in players and sections and manages transitions. The goal? Unity, harmony and audience applause.
A web application may not produce the lofty beauty of an orchestra. But orchestras and applications are alike in being comprised of multiple moving points – and needing an orchestrator to keep the whole operation afloat. In both cases, their success stands or falls on the end-user experience.
Kubernetes is the orchestrator that keeps an application going. The app developer is the conductor, using Kubernetes to realise her vision.
A stock trading app, for instance, fulfils millions of transactions and trades each day. Kubernetes makes this possible.
But Kubernetes can work with smaller groups of containers, too – anything from a simple web app all the way to industry-wide platforms.
It does this by auto-scaling containers across multiple machines and auto-healing when containers fail.
That's what it is and what it does. But why use Kubernetes and not some other platform?
Why Kubernetes?
Many applications are made up of "monoliths". These are single deployable modules that make up applications.
Monoliths have their downsides. They're a bit like Lego models. They take time to build – and if you want to make them bigger, you have to scale everything up piece by piece.
This is where microservices come in. Microservices split each bit of functionality into smaller artefacts. These can be managed, upgraded and scaled individually. In other words, you don't need to rebuild your app from scratch.
Microservices put paid to bottlenecks and over-provisioning. They allow you to allocate resources precisely. Instead of a Lego model made up of hundreds of interdependent pieces, microservices enable developers to swap out individual pieces with ease.
So far, so good. But if each microservice runs on a machine, you're looking at a hell of a lot of resources.
Containers – or "containerised workloads" – solve this problem by bundling up services and deploying them as one. Applications, dependencies and configurations all get delivered together – and they run the same way in any location.
The problem of downtime
So, your workloads are now made up of containers – discrete packages of microservices that replace monolithic blocks.
Want to upgrade a container? Simple! Just create a new version and swap it with the old one.
But how do you achieve this without downtime? How can the developer oversee these containerised workloads? And how do they communicate with each other?
Enter Kubernetes, the container orchestrator.
Kubernetes manages your containers on virtual machines or "nodes". Each node runs something called a "Kubelet" – a minuscule application that communicates with the control plane.
These nodes, and the containers they run, are grouped together in clusters. Each cluster contains DNS, endpoints, storage and scalability – everything a modern application needs, neatly bundled and ready to deploy.
To ensure high availability, Kubernetes provides a replica set. This replicates each container multiple times, adding nodes to the cluster in line with demand.
We compared Kubernetes to an orchestra conductor. But there's a difference. Kubernetes automates repetitive tasks. The app developer tells Kubernetes what the app cluster should look like and Kubernetes makes it happen.
It's a bit like a holographic conductor controlled remotely by a musical genius. The baton's movements are automated. But the conductor's vision for the orchestra is created and deployed elsewhere.
Who should use Kubernetes?
At this point, you might be convinced of the advantages of Kubernetes and ready to board the container train. However, microservices have unique challenges that not all enterprises are ready to face.
Deployment should always be based on the unique needs of an application – and sometimes, a monolith will do the job just fine.
Unsure whether Kubernetes is for you? Talk to a
cloud advisory consultant. They'll be able to look under the bonnet and let you know whether a container orchestrator like Kubernetes will unlock efficiencies to benefit your company.
Ascend Cloud Solutions is dedicated to making the cloud simple. For more easy-to-understand explainers, follow our
cloud computing blog.