- BlockByte
- Posts
- What is Kubernetes?
What is Kubernetes?
Orchestrating Containers: The Power of Kubernetes
Today’s Insights:
What is Kubernetes?
Typical Use Cases and Examples
Advantages & Disadvantages of Kubernetes
Industry Example from Booking.com
What is Kubernetes?
Kubernetes is an open-source platform designed to automate the deployment, scaling, and management of containerized applications. It groups containers that make up an application into logical units for easy management and discovery. Developed by Google, Kubernetes has become a significant force in the development of cloud-native technologies, supporting both declarative configuration and automation. If you don't know what a Container is, check out this article of mine.
Kubernetes cluster architecture
Master (Kubernetes API Server):
This is the control plane of the Kubernetes cluster. It manages the cluster and coordinates all activities within the cluster, including managing workloads and communication between different components.
Pod: A Pod is the smallest and simplest computing unit in Kubernetes. Each Pod contains at least one container, in this case, two containers (Container A and Container B). These containers share network resources and a common storage volume.
Node: A Node is a physical or virtual machine in a Kubernetes cluster. Each Node contains multiple layers of software necessary for running Pods.
Components within a Node:
Kube-Proxy: A network component that runs on each Node and handles network communication within the cluster.
Kubelet: An agent that runs on each Node and ensures that the containers in a Pod are running as expected. It communicates with the Master to receive instructions and provide status reports.
Docker: The container runtime environment responsible for running the containers.
OS (Ubuntu): The operating system on which the Node runs. In this case, it is Ubuntu.
Hardware: The physical hardware on which the operating system and containers run.
Typical Use Cases and Examples
Typical Use Cases and Examples of Kubernetes include simplifying application deployment and management through container orchestration. It is used in microservices architectures to manage the lifecycle of complex applications and ensure there is no downtime during updates or failures.
For example, e-commerce businesses often use Kubernetes to handle sudden surges in traffic during sales events. Moreover, tech companies utilize Kubernetes to ensure their applications can scale as needed without investing in expensive hardware.
Advantages of Kubernetes
The Advantages include its high scalability, which allows it to manage applications of any size efficiently. It also increases the portability and distribution of applications across different environments, aiding in both development and production phases. Moreover, Kubernetes improves the utilization of underlying hardware beneath your containers.
Disadvantages of Kubernetes
It has a steep learning curve that can be challenging for new users. The complexity of its setup and management can also lead to operational challenges. Additionally, the ongoing maintenance and cost of running a Kubernetes environment can be significant, especially for smaller teams or organizations.
Case study: Booking.com
Challenge: In 2016, Booking.com migrated to an OpenShift platform to give product developers faster access to infrastructure. However, Kubernetes, the underlying technology, was abstracted away, causing the infrastructure team to become a "knowledge bottleneck" during challenges. Scaling this support was found to be unsustainable.
Solution: After a year on OpenShift, the platform team decided to develop its own vanilla Kubernetes platform, requiring developers to learn Kubernetes basics. This approach emphasized the non-magical nature of the platform, as noted by Ben Tyler, Principal Developer. The platform team committed to providing necessary learning resources to the developers.
Impact: The introduction of the vanilla Kubernetes platform led to a significant increase in its adoption. The platform reduced the time to create a new service from days or weeks to just 10 minutes. Within the first eight months, about 500 new services were deployed on this platform. The internal engagement and peer support among product engineers concerning Kubernetes also indicated a successful transition towards a more sustainable and empowering developer environment. This shift not only improved operational efficiency but also enhanced the developers' career skills by investing in widely applicable, open-source knowledge.