WritingScalewayScalewaypublished Oct 28, 2024seen 5d

Introduction to Kubernetes - Understanding K8s concepts

Open original ↗

Captured source

source ↗
published Oct 28, 2024seen 5dcaptured 3dhttp 200method plain

Introduction to Kubernetes - Understanding K8s concepts Build • Benedikt Rollik • 28/10/24 • 8 min read

A simple definition of Kubernetes

Kubernetes (K8s) is an open-source platform for managing containerized workloads and services. Google, one of the historic public cloud providers, initially developed the project and made it publicly available in 2014. Originally designed to manage Google's massive internal infrastructure, Kubernetes has since been adopted and further developed by several public cloud providers and independent developers, expanding its capabilities and features.

Since then, Kubernetes has developed a vast and rapidly growing ecosystem. The project's source code is available in its GitHub repository, encouraging collaboration and contributions from developers worldwide.

The name Kubernetes derives from the ancient Greek word meaning helmsman or pilot. This article explains the concept and the different compartments of Kubernetes.

Practical benefits and use cases

What is Kubernetes best used for?

Kubernetes is best used to automate deployment, scaling, and application container operations. It’s ideal for microservices-based applications, CI/CD pipelines, and environments where resilience and scalability are critical. Kubernetes offers self-healing capabilities, automatically restarting failed containers and rescheduling them on healthy nodes.

Why should I use Kubernetes in my infrastructure?

Kubernetes provides a consistent, predictable environment for running applications at scale, with built-in support for load-balancing, automatic scaling, and self-healing. It abstracts the complexities of managing containers, enabling high availability and automated rollbacks. Kubernetes also helps manage sensitive information like OAuth tokens and SSH keys, ensuring secure, reliable operations across complex systems.

What types of applications can Kubernetes manage?

Kubernetes can manage both stateless and stateful applications, batch jobs, and machine-learning workflows. It’s particularly well-suited for distributed systems because it can automatically manage scaling, service discovery, and networking.

Examples of Scaleway Kubernetes use cases

High-availability web applications: Kubernetes' load-balancer ensures services can scale automatically while maintaining service continuity. It can also handle automatic DNS name resolution for seamless service discovery.

Data processing and machine learning: Kubernetes is ideal for scheduling long-running batch jobs and machine-learning models , distributing workload efficiently across nodes.

Multi-cloud deployment: Kubernetes' flexibility allows workloads to run across different public cloud providers or on-premise environments. Scaleway’s Kubernetes Kosmos provides a managed multi-cloud solution for easily deploying advanced configurations.

Is Kubernetes too complex for small teams?

Kubernetes can be complex but managed services like Scaleway Kubernetes Kapsule simplify setup. Using a managed service, Scaleway takes care of the underlying infrastructure, such as the Kubernetes API, and manages the control plane, making it easier for small teams to focus on their applications without worrying about the underlying infrastructure.

How does Kubernetes work vs Docker?

Kubernetes and Docker work hand-in-hand, but they serve different purposes. Docker is a container runtime that is responsible for creating and running containers. Kubernetes, on the other hand, is an orchestrator that manages these containers across a cluster of machines. While Docker manages individual containers, Kubernetes is responsible for deploying, scaling, and managing containerized applications across multiple hosts, providing self-healing and ensuring consistent performance.

You can find more info on the below topics in this article… or you can just carry on here!

From traditional deployment to containerized deployment

To understand why Kubernetes and containerized deployment is so useful for nowadays workloads, let us go back in time and have a view on how deployment has evolved:

During the traditional deployment era , organizations ran applications directly on physical servers. There was no way to control the resources an application may consume, causing resource allocation issues. If an application consumed most of the server's resources, this high load might have caused performance issues on other applications running on the same physical server.

A solution would be to run each application on a dedicated server, which would cause resources to be under-used and maintenance costs to increase.

Multiple Virtual Machines (VMs) brought a beginning of solution during the virtualized deployment era . Virtualization allowed applications to be isolated between different VMs running on the same physical server, providing a security layer and better resource allocation.

As this solution reduces hardware costs, each VM still requires the same administration and maintenance tasks as a physical machine.

The containerized deployment era brought us the concept of containers. A container includes its running environment and all the required libraries for an application to run. Different containers with different needs can now run on the same VM or physical machine, sharing resources. Once configured, they are portable and can be easily run across different clouds and OS distributions, making software less and less dependent on hardware and reducing maintenance costs.

How Kubernetes can help you to manage containerized deployments

In a production environment, you may need to deal with huge amounts of containers, and you need to manage the containers running the applications to ensure there is no downtime.

Managing thousands of simultaneously running containers on a cluster of machines by hand sounds like an unpleasant task.

Kubernetes simplifies managing thousands of containers across a cluster of machines. With automatic scaling, load-balancing , and self-healing , Kubernetes ensures your applications run smoothly without manual intervention. It manages the lifecycle of containerized applications and services. It defines how applications should run and interact with other applications in the outside world while providing predictability, scalability, and high availability.

Kubernetes architecture

Kubernetes is able to manage a cluster of virtual or physical machines using a shared network to communicate between them.…

Excerpt shown — open the source for the full document.

Notability

notability 2.0/10

Routine educational blog post