Kubernetes and its Industrial Use Cases
By: Manas Srivastava
Tags: Use Cases, Kubernetes, Containers, Blog

What is Kubernetes?

Kubernetes (commonly stylized as k8s) is an open-source container orchestration system for automating computer application deployment, scaling, and management.

It was originally designed by Google and is now maintained by the Cloud Native Computing Foundation. It aims to provide a “platform for automating deployment, scaling, and operations of application containers across clusters of hosts”. It works with a range of container tools and runs containers in a cluster, often with images built using Docker. Kubernetes originally interfaced with the Docker runtime through a “Dockershim”; however, the shim has since been deprecated in favor of directly interfacing with containered or another CRI-compliant runtime.

Many cloud services offer a Kubernetes-based platform or infrastructure as a service (PaaS or IaaS) on which Kubernetes can be deployed as a platform-providing service. Many vendors also provide their own branded Kubernetes distributions.

The Rise of Kubernetes

First released in 2014, Kubernetes is an open-source container orchestration tool that can automatically scale, distribute, and manage fault-tolerance on containers. Originally created by Google and then donated to Cloud Native Computing Foundation, Kubernetes is widely used in production environments to handle Docker containers and other container tools in a fault-tolerant manner. As an open-source product, it is available on various platforms and systems. Google Cloud, Microsoft Azure, and Amazon AWS offer official support for Kubernetes, so configuration changes to the cluster itself are not necessary.

The popularity of Kubernetes has steadily increased, with more than four major releases in 2017. K8s also was the most discussed project in GitHub during 2017 and was the project with the second most reviews.

Features of Kubernetes:

Automates various manual processes: for instance, Kubernetes will control for you which server will host the container, how it will be launched, etc.

for instance, Kubernetes will control for you which server will host the container, how it will be launched, etc. Interacts with several groups of containers: Kubernetes is able to manage more cluster at the same time

Kubernetes is able to manage more cluster at the same time Provides additional services: as well as the management of containers, Kubernetes offers security, networking, and storage services

as well as the management of containers, Kubernetes offers security, networking, and storage services Self-monitoring: Kubernetes checks constantly the health of nodes and containers

Kubernetes checks constantly the health of nodes and containers Horizontal scaling: Kubernetes allows you scaling resources not only vertically but also horizontally, easily and quickly

Kubernetes allows you scaling resources not only vertically but also horizontally, easily and quickly Storage orchestration: Kubernetes mounts and adds storage system of your choice to run apps

Kubernetes mounts and adds storage system of your choice to run apps Automates rollouts and rollbacks: if after a change to your application something goes wrong, Kubernetes will rollback for you

if after a change to your application something goes wrong, Kubernetes will rollback for you Container balancing: Kubernetes always knows where to place containers, by calculating the “best location” for them

Kubernetes always knows where to place containers, by calculating the “best location” for them Run everywhere: Kubernetes is an open-source tool and gives you the freedom to take advantage of on-premises, hybrid, or public cloud infrastructure, letting you move workloads to anywhere you want

Kubernetes Case Studies

1. Pinterest’s Kubernetes Story

With over 250 million monthly active users and serving over 10 billion recommendations every single day, the engineers at Pinterest knew these numbers are going to grow day by day, and they began to realize the pain of scalability and performance issues.

Their initial strategy was to move their workload from EC2 instances to Docker containers; they first moved their services to Docker to free up engineering time spent on Puppet and to have an immutable infrastructure.

The next strategy was to move to Kubernetes. Now they can take ideas from ideation to production in a matter of minutes, whereas earlier they used to take hours or even days. They have cut down so much overhead cost by utilizing Kubernetes and have removed a lot of manual work without making engineers worry about the underlying infrastructure.

2. Airbnb’s Kubernetes Story

Airbnb’s transition from a monolithic to a microservices architecture is pretty amazing. They needed to scale continuous delivery horizontally, and the goal was to make continuous delivery available to the company’s 1,000 or so engineers so they could add new services. Airbnb adopted Kubernetes to support over 1,000 engineers concurrently configuring and deploying over 250 critical services to Kubernetes (at a frequency of about 500 deploys per day on average).

3. The New York Times’s Journey to Kubernetes

Today the majority of the NYT’s customer-facing applications are running on Kubernetes. What an amazing story. The biggest impact has been an increase in the speed of deployment and productivity. Legacy deployments that took up to 45 minutes are now pushed in just a few. It’s also given developers more freedom and fewer bottlenecks. The New York Times has gone from a ticket-based system for requesting resources and weekly deploy schedules to allowing developers to push updates independently.

4. Spotify adopting Kubernetes

Launched in 2008, the audio-streaming platform Spotify has grown to over 200 million monthly active users across the world. An early adopter of microservices and Docker, Spotify had containerized microservices running across its fleet of VMs with a homegrown container orchestration system called Helios. By late 2017, it became clear to them that having a small team working on the features was just not as efficient as adopting something that was supported by a much bigger community.

When they originally looked at Kubernetes, they were in an interesting situation, because they had already had an in-house orchestration solution they had built, and, anecdotally, launched the very same week an open-source when Kubernetes was launched. So they did a lot of work to essentially make the transition to Kubernetes incredibly easy for developers, and to make it so that we could have hundreds of teams work across shared clusters securely and safely together.

Despite its early adoption, Spotify began to shift to Kubernetes “in earnest” about a year and a half ago. Kubernetes has since played a key role in Spotify’s DevOps in two key ways. This includes how the platform has helped to reduce toil.

Thanks for Reading 😊