Kubernetes architecture is built to manage the lifecycle and operations of containerized applications across diverse infrastructure. Kubernetes not only simplifies cloud application deployment but also offers a robust framework for operational excellence in the cloud era. 

 

Kubernetes, at its core, orchestrates containerized applications across a cluster of machines. This orchestration allows for high availability, fault tolerance, and scalability in deploying applications. Let’s dissect the key components that make Kubernetes an essential tool for managing distributed systems.

 

This document outlines the various components you need to have for a complete and working Kubernetes cluster.

The Foundation: Clusters and Nodes

A Kubernetes Cluster is a set of nodes that run containerized applications. These nodes are the workhorses of a Kubernetes cluster, where:

  • Worker Nodes host the Pods—the smallest deployable units that can be created and managed in Kubernetes.
  • Control Plane Nodes manage the state of the cluster, including scheduling applications, maintaining applications' desired state, scaling applications, and rolling out new updates.

Understanding these components is crucial for anyone looking to specialize in cloud computing or distributed systems.

Control Plane Components: The Brain Behind the Operation

The control plane is responsible for making global decisions about the cluster and reacting to cluster events. Its components include:

  • kube-apiserver: This acts as the front end to the cluster’s control plane. It exposes the Kubernetes API, which is the primary management interface of Kubernetes. The kube-apiserver is designed to scale horizontally, ensuring Kubernetes can manage and scale applications efficiently.
  • etcd: A highly available key-value store used for all cluster data, ensuring there's a reliable source of truth for the state of the cluster. Proper management of etcd is crucial for cluster health and data integrity.
  • kube-scheduler: Responsible for assigning newly created Pods to Nodes, taking into account the operational requirements of the workloads and the current infrastructure's state.
  • kube-controller-manager: Runs controller processes that monitor the state of the cluster through the apiserver and make changes aiming to move the current state towards the desired state.
  • cloud-controller-manager: Integrates the cluster into the cloud provider's API, allowing Kubernetes to interact with the underlying infrastructure when necessary.

These components ensure the cluster is behaving as intended, handling scheduling, and interacting with underlying infrastructure.

Node Components: The Muscle Doing the Heavy Lifting

Each node in a cluster runs several mandatory components:

  • kubelet: Ensures that containers are running in a Pod. It starts, stops, and maintains application containers organized into Pods as directed by the control plane.
  • kube-proxy: Maintains network rules on nodes, allowing communication to your Pods from network sessions inside or outside of your cluster.
  • Container Runtime: The software responsible for running containers. Kubernetes supports several container runtimes, like containerd and CRI-O.

These components are essential for the actual running of applications on the physical or virtual machines within the cluster.

 

'ML Engineering > Kubernetes' 카테고리의 다른 글

Kubernetes - Overview I  (0) 2024.04.05

 

Kubernetes?

Kubernetes는 컨테이너화된 애플리케이션의 배포, 확장, 관리를 자동화하기 위해 설계된 오픈 소스 플랫폼입니다. declarative configuration and automation를 통해 대규모 애플리케이션 관리를 용이하게 합니다. Kubernetes는 그리스어에서 '키잡이' 또는 '조타수'를 의미하며, Google이 2014년에 오픈 소스로 공개했습니다. 이는 Google의 대규모 운영 경험과 커뮤니티의 아이디어를 결합한 것입니다.


The Evolution of Deployment

Traditional deployment era

초기에는 애플리케이션을 물리 서버에 직접 배포했으나, 리소스 할당 문제가 발생했습니다. 애플리케이션마다 물리 서버를 사용하는 것은 확장성이 떨어지고 비용이 많이 드는 방법이었습니다.

Virtualized deployment era

가상화는 물리 서버의 CPU 위에 여러 가상 머신(VM)을 실행할 수 있게 하여 리소스 활용도를 개선했습니다. 각 VM은 자체 OS를 포함하여 애플리케이션 간 격리를 제공합니다.

Container deployment era

컨테이너는 VM과 유사하지만, OS를 애플리케이션 간에 공유하여 더 가볍게 만들었습니다. 컨테이너는 이동성, 민첩한 개발 및 배포, 환경 일관성 등의 이점으로 인해 인기를 끌고 있습니다.

 


Kubernetes 의 필요성

프로덕션 환경에서 컨테이너를 관리하려면 높은 가용성을 보장하고 수요에 따라 확장해야 합니다. Kubernetes는 분산 시스템을 탄력적으로 운영할 수 있는 프레임워크를 제공합니다.

Kubernetes의 주요 기능

  • Service discovery and load balancing: DNS 이름이나 IP 주소를 사용하여 컨테이너를 노출하고 네트워크 트래픽을 분산시킵니다.
  • Storage orchestration: 자동으로 스토리지 시스템을 마운트합니다.
  • Automated rollouts and rollbacks: 원하는 상태를 선언적으로 관리하며 변경사항을 자동으로 적용합니다.
  • Self-healing: 실패한 컨테이너를 재시작하고, 문제가 있는 컨테이너를 교체합니다.
  • Secret and configuration management: 비밀 정보를 안전하게 저장하고 관리합니다.
  • Horizontal scaling: CPU 사용량에 기반해 애플리케이션을 자동으로 확장하거나 축소합니다.

'ML Engineering > Kubernetes' 카테고리의 다른 글

Kubernetes - Overview II - Components  (0) 2024.04.05

+ Recent posts