What is Kubernetes?

This article is a part of a series on the fundamentals of Kubernetes – for those that could benefit from a basic explanation of Kubernetes concepts.

In this article I will try to minimize technical jargon while explaining Kubernetes concepts at an introductory level. In order to understand the problem Kubernetes solves, it is important to have a good understanding of containers. If you are new to containers, please read this article introducing containers.

First, a formal definition:

Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications. It was originally developed by Google and is now maintained by the Cloud Native Computing Foundation (CNCF).

What Kubernetes Solves

As a thought exercise, let’s pretend you’ve convinced the developers on your team to package applications in containers – knowing all the advantages containers bring. Now you need figure out how to run all of these containers on your servers (or on your cloud provider’s servers).

Some of the challenges you will need to consider:

  • Determine which servers are available to host your container
  • Ensure your container can be reached on the network, so it can participate in processing requests
  • Verify whether the container was able to start properly
  • If a container has a problem or gets “stuck”, you will need a way to restart the container
  • Add more container instances to handle any sudden increases in traffic
  • Spread the processing load evenly among all containers
  • Reduce the number of containers when no longer needed, to control costs
  • Find a way to provide configuration parameters to the application
  • If the application requires data storage space, provide storage that is reliable and available, even if the container is stopped or replaced
  • Provide an easy and efficient way for containers to communicate with each other, regardless of which servers they are running on
  • Ensure any apps requiring higher than usual cpu and memory run on special servers that can provide this higher capacity
  • Develop a way to get system metrics – measurements of how each part of the system is performing – so you can spot any potential problems early
  • Find a way to swap the application containers when a newer version is available, while avoiding any downtime

As you can see, things can get very complicated fast. Thankfully, those challenges are exactly what Kubernetes aims to solve – and many more.

I will talk a bit about each component’s responsibility in the next section, but first, it is worth mentioning that Kubernetes is not the only solution to “orchestrate containers”. A non-exhaustive list of Kubernetes alternatives include:

  • Docker Swarm
  • Amazon ECS (Elastic Container Service)
  • Google Cloud Run
  • Apache Mesos
  • HashiCorp Nomad
  • Rancher

So what is special about Kubernetes that makes it such a popular solution for working with containers? Kubernetes started out as the brainchild of Google. Google started developing and using Kubernetes internally several years before making it widely available as open-source software (on June 7, 2014). This gave Kubernetes a chance to prove itself at significant scales that are common for Google .

Google offices (Image: Shutterstock)

As open-source software, Kubernetes gained a lot of interest in the community. Soon, the number of contributors helping to maintain and extend the source code grew, as did amount of software built on top of Kubernetes.

In fact, this interest and momentum is a primary reason why companies choose to open-source their software in the first place. Open-sourcing Kubernetes appeared to have been a wise decision on Google’s part.

Kubernetes was also put into the spotlight by the Cloud Native Computing Foundation (CNCF), an open-source organization that focuses on advancing the adoption of cloud-native technologies and practices. You can think of CNCF as a kind of advocacy group around cloud-native technologies and best practices.

Kubernetes Components

Kubernetes is not a single piece of software – it is comprised of different components, each having it’s own responsibility.

Image Source: Kubernetes

The diagram above is a visualization of a Kubernetes cluster – a term used to describe the complete system and all its parts working together.

A Kubernetes cluster can be divided into 2 main parts:

Control Plane

The “command center” of Kubernetes. When we want Kubernetes to perform certain actions – such as deploy a new container – this is the component we need to provide instructions to. The control plane is made of up several sub-components, each handling a specific task. The control plane always knows the complete status and health of the entire cluster so it can make decisions about where to place containers.

Data Plane

The data plane contains the nodes on which containers run. A “node” is just another word for computing servers that are part of the cluster. Nodes provide the cpu, memory, network connectivity and sometimes storage to the containers. Each node has an “agent” (kubelet) – a small piece of software that carries out instructions it receives from the control plane. It also communicates back to the control plane to keep it updated on the current status of the node.

There is really nothing special about nodes. A wide variety of computers can act as nodes. In fact, with software such as minikube, you can run a small Kubernetes cluster and turn your own laptop into a Kubernetes node! This is an excellent way to learn and play around with Kubernetes.

Control Plane Components

As mentioned, the control plane is the brains of Kubernetes and contains most of the “orchestration” logic. Here is a brief summary of each component:

  • kube-apiserver – a central component of Kubernetes responsible for exposing the Kubernetes API, handling authentication and authorization, validating and defaulting resource configurations, and interacting with the etcd datastore.
  • etcd – a distributed and highly available key-value store that Kubernetes uses to store cluster configuration and state data. It ensures the reliability and consistency of the cluster’s desired state.
  • scheduler – responsible for making intelligent decisions about where to place pods within the cluster based on resource requirements, constraints, and other factors to ensure efficient utilization of cluster resources and high availability of applications.
  • controller-manager – responsible for running and managing various controllers that maintain the desired state of resources in a Kubernetes cluster. These controllers automate tasks related to scaling, self-healing, and resource management.
  • cloud controller manager – acts as an intermediary layer that abstracts and manages cloud-specific operations, enabling integration with various cloud providers. This component is only needed when Kubernetes is run in a cloud provider or in a hybrid architecture.
Data Plane Components

The data plane contains the computing resources for running containers. There are however a few Kubernetes management components running in the data plan that provider the “glue” that allows the nodes to act as part of the cluster:

  • kubelet – this component runs on every node and is responsible for translating the desired state of pods into actual running containers on the node. It acts as the bridge between the Kubernetes control plane, which specifies the desired state, and the container runtime, which manages the actual containers.
  • kube-proxy – a networking component that helps maintain network rules and enables communication between pods, services, and external clients within the cluster. It also plays a crucial role in load balancing, network policy enforcement, service discovery, and overall network management. This component also runs on each node.

Does Kubernetes Cost Anything?

Technically, Kubernetes is open-source, meaning you can download and use the software source code free of licensing costs. That said, you will still need computers to host the different components, and the knowledge and experience to know how to install, configure and maintain a Kubernetes cluster.

Kubernetes Cloud Solutions

Cloud providers such as Amazon’s AWS (EKS) and Google’s GCP (GKE) provide ready-to-use Kubernetes clusters at a cost. Kubernetes offered by cloud providers are immensely popular since the most complex part – setting up the control plane – is already performed by the cloud provider. You will simply need to choose the virtual servers to act as “worker” nodes within the data plane.

Cloud providers also run the Kubernetes control plane with a certain amount of resiliency (high-availability) and hide all of the complexities of upgrading and maintaining the versions of Kubernetes components. You can get going a lot quicker and more efficiently than installing each piece yourself.

You could say cloud providers have turned Kubernetes into a commodity. In fact, many cloud providers are taking this abstraction to another level – allowing you to simply deploy containers to a Kubernetes cluster without worrying about the control plane or data plane.

Fun Facts

The name Kubernetes originates from Ancient Greek, meaning ‘helmsman’ or ‘pilot’ [source].

Before Google decided on the final name, the project was internally called ‘The Borg’ and ‘Seven of Nine’ – both Star Trek references [source].

Kubernetes is often referred to as ‘K8s’, an abbreviation of Kubernetes. Instead of using the entire word, you simply replace the ‘ubernete’ with the digit 8. Add an ‘s’ and done.

Conclusion

I hope this is gives you a good starting point for understanding Kubernetes. If you think I missed something, please feel free to leave a comment.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top