kubernetes kubernetes/primer

Resources

The Kubernetes Book (2024 edition) by Nigel Poulton
Kubernetes Quick Start (2024 edition) by Nigel Poulton
Kubernetes Up & Running (3rd Edition)
Kubernetes Tutorial For Beginners

What is Kubernetes

Official Definition

Kubernetes is a portable, extensible, open source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available.

Kubernetes is an orchestrator of containerized cloud-native microservices apps.

Summary

Kubernetes is an application orchestrator that brings together different microservices and organises them into a useful application. It also provides and manages cloud-native features such as scaling, self-healing, and updates.


Kubernetes Background

Most people pronounce Kubernetes as “koo-ber-net-eez”.
Derived from the Greek word for “helmsman” or “pilot,” symbolizing control and management.
It shortened to K8s and pronounced as “kates”. The number 8 replaces the eight characters between the “K” and the “s”.

Developed by Google, inspired by its internal system Borg.
Made available in 2014, hosted by the Cloud Native Computing Foundation (#CNCF).

Why do we need K8s

  • Container Deployments / Orchestration

K8s helps achieve the following,

  1. Self Healing
  2. Automatic Container Scheduling
  3. Horizontal and Vertical Scaling
  4. Rolling application upgrades and downgrade with zero downtime

Jargon

👉 Jargon

Quote

“Kubernetes is an orchestrator of containerized cloud-native
microservices apps.”
means: Kubernetes deploys and manages applications that are packaged as containers and can easily scale, self-heal, and be updated.

K8s & Docker

early versions of k8s shipped with docker and used it as its runtime (Kubernetes used Docker for low-level tasks such as creating, starting, and
stopping containers)

Kubernetes 1.24 finally removed support for Docker as a runtime as it was bloated and overkill for what Kubernetes needed. Since then, most new Kubernetes clusters ship with containerd as the default runtime. Fortunately, containerd is a stripped-down version of Docker optimized for Kubernetes, and it fully supports applications containerized by Docker.

In fact, Docker, containerd, and Kubernetes all work with images and containers that implement the Open Container Initiative (OCI)2 standards.

05. Container Interfaces
Most Popular Container Runtimes

Docker Swarm

In 2016 and 2017, Docker Swarm, Mesosphere DCOS, and Kubernetes competed to become the industry standard container orchestrator. Kubernetes won.

👉 02. Docker Swarm

Kubernetes

Kubernetes is the de facto1 platform for cloud-native applications, and we sometimes call it the operating system (OS) of the cloud. This is because Kubernetes abstracts the differences between cloud platforms the same way that operating systems like Linux and Windows abstract the differences between servers:

  • Linux and Windows abstract server resources and schedule application processes
  • Kubernetes abstracts cloud resources and schedules application microservices

In summary, Kubernetes makes it easier to deploy to one cloud today and migrate to another cloud tomorrow.

Application Scheduling

At a high level, a cloud or data center is a complex collection of resources and services.
Kubernetes can abstract a lot of these and make them easier to consume. Again, how often do you need to care about which compute node, which failure zone, or which storage volume your app uses? Most of the time, we’re happy to let Kubernetes decide.

Footnotes

  1. De facto is Latin for “of fact,” meaning “in reality,” and it’s usually contrasted with “de jure,” which means “of law,” or “officially.” If you’re the de facto mayor of your town, you’re acting as mayor, even though you weren’t legally elected. ↩