Skip to content
Lucas Mauro

What is Kubernetes?

How can it handle containers for us?

kubernetes 2 min read

Kubernetes (or k8s, as it’s often abbreviated), is a platform for managing containerised applications across a cluster of severs. With Docker we can package and run a single application in a container, but with Kubernetes we can expand this and let it decide important things such as when to run, restart, scale up or down the number of pods running our applications. All that without manual intervention.

Although we can run a few containers ourselves, it is not manageable to run hundreds of them, with their replicas and all intricate complexity that comes with it. Kubernetes monitors health, restarts what needs to be restarted, balances and routes network traffic, handles deployments with no downtime and even more.

Running a handful of containers on a single server is manageable. But once you need multiple replicas of a service for redundancy, or you’re running dozens of microservices that need to discover and talk to each other, things get complicated fast. You’d need to manually decide which server runs which container, monitor their health, restart failed ones, balance traffic, and handle deployments without downtime. We describe a desired state and k8s tries its best to make that come true.

Kubernetes offers much more than this, but the following already provide us with great insight into how it is such a powerful tool:

  • Scheduling: decides which node (or server, if we were to call it another name) in the cluster runs each pod (a container in execution), based on resource availability and constraints;
  • Self-healing: detects when containers crash or nodes go down, then reschedules pods on other healthy nodes automatically;
  • Load balancing: watches the network traffic across replicas of a service so no single instance gets overwhelmed;
  • Rolling updates: new version of an application are gradually deployed, with automatic rollback when things go wrong;
  • Declarative configuration: everything is described in YAML manifests, which can be version-controlled and reproducible anywhere;
  • Portable by design: the manifest files can be used to run on any infrastructure, be it your own, AWS’s, GCP’s or any other.

The following are a few of its key concepts and objects.

Comments