Kubernetes, The Operating System for the Cloud

During the last ten years, the IT infrastructure market has gone through a tectonic shift. First, it was Infrastructure as a Service (IaaS) that revolutionized the way compute, storage and network resources were provisioned and consumed by businesses. The second half of the last decade witnessed the rise of containers, container management platforms and Containers as a Service (CaaS) offerings in the cloud. 

The cloud-based infrastructure services, such as Amazon EC2, Azure Virtual Machines and Google Compute Engine, delivered on-demand infrastructure based on a self-service and programmatic approach to provisioning resources. They enabled businesses to start small and scale fast. 

In 2013, Docker, Inc. demonstrated Docker, a lightweight operating system (OS)-level platform based on Linux containers. Docker relied on an inherent capability of Linux OS to run multiple isolated applications within the same operating system. 

Traditionally, virtualization provided the ability to run multiple operating systems within the same OS. Hypervisors handle the partitioning of resources and strong isolation of virtual machines. Linux Containers offer OS-level virtualization for running multiple isolated Linux processes (containers) on a host using a single Linux kernel. The Linux kernel leverages cgroups for resource control, Linux namespaces for isolation, and prioritization of resources such as CPU, memory, block I/O and network, all without the need for launching virtual machines. 

Unlike virtual machines, containers don’t depend on a hypervisor. They share the underlying operating system services at the kernel level. Linux containers are smaller in size, start at regular process start-up speed, scale rapidly, and most importantly, they are portable. A container built on Ubuntu can be quickly deployed on Red Hat with absolutely no changes. Administrators can start containerized applications in milliseconds and scale them to hundreds of instances in no time. 

Though containers were a part of modern Unix-based operating systems — such as Linux (LXC), FreeBSD (Jails) and Solaris (Zones) — it was Docker, Inc. that made the technology accessible to developers. It revolutionized application development and deployment.
The combination of IaaS and containers in the public cloud promised unmatched scale and agility to organizations. The ability to launch tens — in some cases even hundreds — of containers in each virtual machine enabled maximum utilization of CPU and memory resources of each virtual machine (VM). Containers deployed in the public cloud made it possible to run web-scale workloads at an affordable cost.

The potent combination of IaaS and containers became the secret sauce of web-scale startups. While Docker, Inc. delivered the container runtime and tools to manage the life cycle of a container, the industry realized that it needed a platform to manage hundreds of containers running across hundreds of virtual machines. This led to the release of Docker Swarm by Docker, Inc. and DC/OS from D2iQ (formerly Mesosphere). 

Well before containers became popular among developers, Google was running some of its core web services in Linux containers. In a presentation at GlueCon 2014, Joe Beda (one of the creators of Kubernetes) claimed that Google was launching over two billion containers in a week. The secret to Google’s ability to manage containers at that scale was its internal data center management tool, Borg. 

In June 2014, Google launched an open source software platform to manage containers at scale, called Kubernetes. It was a flavor of Borg that was less opinionated. Google incorporated the best ideas from Borg into Kubernetes, while also addressing the pain points that users had identified with Borg over the years. In 2015, Kubernetes 1.0 was contributed to The Linux Foundation, which then formed the Cloud Native Computing Foundation (CNCF) to manage and govern the project. Today, CNCF is a custodian of multiple open source projects related to containers — including Containerd, Envoy, Prometheus and others. 

Where did Docker fit into this picture? Docker’s purpose was to simplify building modern applications. The developer installed the Docker Engine on her workstation and then used Docker application programming interfaces (APIs) and tools to manage the life cycle of containerized applications. Docker built Compose and Swarm as an extension to the core Docker Engine, making it possible to use the familiar workflow and toolchain to deploy and manage multicontainer workloads across multiple nodes/machines. 

But it was Google that took the next step, by making it possible to run different types of containerized workloads at scale on Kubernetes. The extensibility, scale and choice of deployment environments soon made Kubernetes the favorite of developers and operators.
Apache Mesos, an open source project developed at the University of California at Berkeley, was one of the original distributed computing architectures for managing application workloads on compute clusters. But ultimately it faded away, as the industry and open source community put their support behind the Kubernetes ecosystem. Mesos is a mature distributed computing environment, but it is more suited for large-scale systems with hundreds of nodes. Mesos was originally designed for distributed applications based on Apache Hadoop, Apache Spark and Kafka. Container orchestration came much later in the form of the Marathon plugin. On the other hand, Kubernetes was designed with containerization in mind and an ability to run on small and large clusters with the same ease and flexibility. 

Docker, Inc. has also embraced Kubernetes as the preferred container orchestration tool, by embedding it in Docker Desktop and Docker Enterprise. In November 2019, Mirantis, an OpenStack-based infrastructure company, acquired Docker’s enterprise business — including its Kubernetes as a Service offerings. 

Given its simplicity, accessibility and ability to scale, Kubernetes went on to become the most preferred container management platform. Indeed, it is one of the fastest growing open-source projects in the history of computing. Modern applications and greenfield applications increasingly use Kubernetes, which has led to the rise of enterprise container management platforms like Google Anthos, Red Hat OpenShift and VMware Tanzu. There’s also been an increase in managed Container as a Service offerings in the public cloud, such as Amazon Elastic Kubernetes Service, Azure Kubernetes Service and Google Kubernetes Engine. 

_____________
Excerpt from: The State of the Kubernetes Ecosystem, Second Edition Janakiram MSV and Lawrence Hecht. Publisher: The New Stack 2021