Skip to content

Kubernetes architecture components

Kubernetes (k8s) is a container orchestration tool designed to manage containerized applications across multiple hosts on a cloud platform.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md] Its primary goal is to simplify and power the deployment of applications by providing mechanisms for deployment, planning, updates, and maintenance.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md]

Control Plane Components

The control plane manages the cluster state. In a typical architecture, these components may run on dedicated Master nodes or combined with worker nodes in smaller deployments.

  • API Server: The core management component that handles CRUD operations for core objects (such as Pod, Service, and RC).^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md] It serves as the hub for data exchange between internal modules.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md]
  • Etcd: A high-availability, strongly consistent key-value store used to persist resource information.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md] It acts as the backing store for all cluster data.
  • Controller Manager: Maintains the desired state of the cluster.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md] It handles tasks such as fault detection, automatic scaling, and rolling updates.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md]
  • Scheduler: Responsible for resource scheduling, assigning Pods to specific nodes based on predefined policies (such as resource availability).^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md]

Node Components

Nodes are the physical or virtual machines where containerized applications run. They are managed by the Master.

  • Kubelet: The primary agent running on each node.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md] It ensures that containers described in Pod specs are running and healthy.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md] It manages the isolation of application containers from the host and from each other.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md]
  • Kube-proxy: Manages network rules on nodes.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md] It provides service discovery and load balancing for Services within the cluster.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md]
  • Container Runtime: The software responsible for running containers (e.g., Docker).^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md]

Network Components

  • Service: An abstraction that defines a logical set of Pods and a policy to access them.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md] Because Pod IPs are ephemeral, Services provide a stable endpoint (IP and Port) for a group of Pods, typically selected using [[Label]] selectors.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md]
  • Ingress: An API object that manages external access to Services, typically HTTP/HTTPS.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md] Unlike Services, which operate at Layer 4 (TCP/UDP), Ingress operates at Layer 7 (Application) and can route traffic based on domain names or URL paths.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md]

Key Concepts

  • Pod: The smallest logical unit (atomic unit) that can be deployed in Kubernetes.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md] A Pod encapsulates one or more containers (e.g., in a SideCar pattern) that share resources such as network and storage.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md]
  • Pod Controllers: Templates used to manage the lifecycle of Pods, ensuring that the specified number of Pods are running and healthy.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md] Common controllers include Deployment, ReplicaSet, StatefulSet, and DaemonSet.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md]
  • Namespace: A mechanism to isolate resources within a cluster, effectively creating virtual clusters.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md] This allows resource names to be unique within a namespace but duplicated across different namespaces.^[400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md]

Sources

  • 400-devops__06-Kubernetes__k8s-paas__02.企业部署实战_K8S.md