Kubernetes and its industrial use case

Nitesh Thapliyal
5 min readDec 26, 2020

--

Hello everyone,

In this blog, we are going to discuss the following points:

  • What is Kubernetes?
  • Why we need Kubernetes?
  • What is its industry use case?
  • How does Kubernetes work?

So let's get started 👩‍💻

What is Kubernetes?

Before we start with what is Kubernetes? we should know what are containers and what is the drawback of containers.

Containers:

Containers are a form of operating system virtualization. A single container might be used to run anything from a small microservice or software process to a larger application. Inside a container are all the necessary executables, binary code, libraries, and configuration files.

This makes the container fast, reliable, lightweight, and scalable, then there is a problem that comes with that and this is what is the result of the need for Kubernetes.

Containers are scalable, we can scale two containers or four but in the real world, we have to scale it up to 50 or 100 containers and that kind of scalability is not easy and we need to manage those containers and making sure servers are connected to each other.

The drawback of the container are:

  • The container at that scale is hard to manage as containers should be connected to each other if they are not connected there is no reason for scalability.
  • Distributing traffic in challenging in containers.
  • Containers are not auto-scalable

In containers when lots of traffic comes to the server it makes hard for the server to handle that much traffic then we need to manually scale up the server and if again traffic increase again we need to manually scale up, which is not ideal and soon the time will come when the server will crash.

And that's where Kubernetes comes into play, what Kubernetes does is it keeps analyzing the traffic and load that has been used by the container, and when traffic reaches its threshold auto-scaling happens. If more traffic comes up Kubernetes auto-scale up the container.

So, kubernetes is an open source Container Management tool which automates container deployment, container scaling, descalling and container load balancing.

The Feature of Kubernetes are:

  • Automatic Binpacking
  • Service Discovery and Load balancing
  • Storage Orchestration
  • Self Healing
  • Secret and Configuration Management
  • Batch Execution
  • Horizontal Scaling
  • Automatic Rollback and Rollouts

Now we have discussed What Kubernetes is and why we need it so, now let's discuss its industry use case...

Pokemon Go

Pokémon Go is a 2016 augmented reality mobile game developed and published by Niantic in collaboration with The Pokémon Company for iOS and Android devices. A part of the Pokémon franchise, the game is the result of a collaboration between Niantic, Nintendo, and The Pokémon Company.

The Challenge faced by the Pokemon Go Engineers:

Pokemon Go engineers never thought their user base would increase exponentially surpassing the expectations within a short time. Even the servers couldn’t handle this much traffic.

The challenges were:

  • The biggest challenge for any application is Horizontal Scaling.
  • But for Pokemon Go Vertical Scaling was also a major challenge, because of real-time activity in a gaming environment for millions of users worldwide.
  • Niantic was prepared for traffic disasters of up to 5x time

What was the solution for these challenges?

The Solution “The magic of containers”. The application logic for the game ran on Google Container Engine (GKE) powered by the open-source Kubernetes project.

Niantic chose GKE for its ability to orchestrate their container cluster at a planetary-scale, freeing its team to focus on deploying live changes for their players. In this way, Niantic used Google Cloud to turn Pokémon Go into service for millions of players, continuously adapting and improving. This got them more time to concentrate on building the game’s application logic and new features rather than worrying about the scaling part.

Here you heard the term orchestrate and that might made you think what that is, so let me simplify it for you.

Kubernetes orchestration allows you to build application services that span multiple containers, schedule containers across a cluster, scale those containers, and manage their health over time. Kubernetes eliminates many of the manual processes involved in deploying and scaling containerized applications.

“Going Viral” is not always easy to predict but you can always have Kubernetes in your tech stack.

How does Kubernetes work?

So in Kubernetes, there is a Kubernetes master that controls everything, point to be noted that the container does not run in Kubernetes Master, containers run in nodes.

First, we need to create a master that's the first step to create a cluster then connect nodes to the master. Master only be scheduling and replicating containers to the nodes and makes sure that configurations are right.

There is two way to access Kubernetes master:

  • UI
  • CLI

The default way to access the Kubernetes master is using CLI.

Lets first discuss the terminologies:

  • Master: Master control the cluster and nodes in it.
  • Node: Node host the container inside them and containers are inside pods.
  • Pods: Pods are a logical collection of containers that need to interact with each other for an application.

So basically Master control the nodes and inside the, here are containers and containers are stored in multiple pods.

Hope this blog was helpful to you✨

Thank you!!❄

--

--