当前位置:网站首页>Kubernetes technology and Architecture (VI)
Kubernetes technology and Architecture (VI)
2022-07-23 10:47:00 【uesowys】
1 Preface
1.1 CNCF
1.2 Cloud native
1.3 Public cloud services
1.4 Private cloud services
1.5 Hybrid cloud services
2 Kubernetes Definition
2.1 Basic concepts
2.2 Architecture evolution
2.2.1 Traditional deployment (Traditional deployment )
2.2.2 Virtualization deployment (Virtualized deployment)
2.2.3 Containerized deployment (Container deployment)
2.3 Use scenarios
2.4 Use constraints
3 Kubernetes framework
3.1 Cluster architecture
3.2 Control surface (Control Plane) Components
3.2.1 kube-apiserver
3.2.2 etcd
3.2.3 kube-scheduler
3.2.4 kube-controller-manager
3.2.5 cloud-controller-manager
3.3 node (Node) Components
3.3.1 kubelet
3.3.2 kube-proxy
4 Kubernetes technology
4.1 Containerization Technology
4.1.1 cgroups technology
4.1.1.1 The basic definition
4.1.1.2 Core interface file
4.1.1.3 Basic operation
4.1.1.3.1 mount
4.1.1.3.2 process
4.1.1.3.3 Threads
4.1.1.3.4 event
4.1.1.3.5 controller
4.1.1.3.6 Delegation of authority
4.1.1.3.7 Guiding principles
4.1.1.4 Resource distribution model
4.1.1.4.1 The weight
4.1.1.4.2 Limit
4.1.1.4.3 Protect
4.1.1.4.4 Distribute
4.1.1.5 controller
4.1.1.5.1 processor
4.1.1.5.2 Memory
4.1.1.5.3 IO
4.1.1.5.4 process
4.1.1.5.5 equipment
4.1.1.5.6 RDMA
4.1.2 Docker Container running environment
From the perspective of system architecture ,docker Just a container running environment , Deployed in docker Other features of the application in , For example, high availability 、 high reliability 、 high scalability 、 Elastic scalability and other related non functional features need Kubernetes Guarantee of architecture . This chapter mainly describes docker Properties related to the operating environment of the container .
From the analysis of the previous chapters ,Kubernetes Use kubelet Component docking Kubernetes Containerization CRI Interface and docker Container running environment , therefore , Users can use kubelet The operation commands provided by the component operate directly docker Container running environment .
4.1.2.1 Docker framework

As shown in the figure above ,docker The architecture consists of the following parts :
Docker daemon |
The process is in each server host docker Run the background process of the environment , Responsible for listening to requests 、 management docker Objects include mirrors 、 Containers 、 Network and storage capacity , Multiple docker Background processes can communicate with each other |
Docker client |
Docker The client is a console , Users can use the console to communicate with docker Processes communicate with each other, such as sending operation instructions , Users can work with multiple docker Processes communicate with each other |
Docker registries |
Docker The registry is responsible for storing docker Container mirror (images), Users can publish container images to the registry for management , Users can pull the corresponding container image from the registry and deploy it in the local container running environment |
Docker objects |
Container objects include the following categories : Mirror image (images): A container image (image) Is a read-only file , Provide the container running environment with a runtime docker Container instance , In general , A running environment needs to rely on other components , therefore , A container image can rely on other container images . Users can use dockerfile Create a container image , You can also go straight from docker The image registry downloads container images . Users can rebuild the container image and republish it to the container image registry . therefore ,docker It is a container technology that is lighter than virtual machine technology . Containers (Containers): A container (container) It's a container image (image) Running instance of . Users can use docker Client command creation 、 start-up 、 stop it 、 Move 、 Delete a container . The user can specify the network of the container 、 Storage and container isolation level . |
4.1.2.2 Use scenarios

As shown in the figure above ,docker Containerization technology in practice devops Usage scenarios in the architecture . stay devops In the standardization process ,docker The image registration center of is the central area connecting the development stage and the operation and maintenance stage , It's the realization of CI Continuous integration with CD The central link of continuous release .
Empathy , stay kubernetes When arranging application services in the environment , You can also pull the application service image corresponding to the business from the above container image center , Using this method, traditional docker Environment and kubernetes Environmental Science , So that the same image can be quickly released to different environments .
4.1.3 containerd Container running environment
containerd It's the realization of kubernetes Of CRI Container running environment with standard interface .
4.1.3.1 Containerd framework
![]()

Containerd yes CNCF Standard projects , From the above architecture diagram ,docker And kubernetes All use containerd Running environment as container .Containerd Realization kubernetes Standards for CRI Interface , therefore ,kubernetes have access to kubelet The client realizes the full life cycle management of container objects in the container running environment .
Containerd The main structure of is divided into API The interface layer 、 Core layer 、 Back end layer , As follows :
API The interface layer |
The interface layer provides three open module interfaces , Namely containerd client、service handlers、metrics containerd client: Provide external clients , It can be directly used or docked CRI Standard interface service handlers: Service interface of protocol type provided externally metrics: Provide an interface of information statistics type , from Prometheus Component implementation |
Core layer |
Container service layer , Provide different services , Including container metadata management 、 Container image management 、 Container object management and other related services |
Backend layer |
Underlying technical services at the operating system level , It mainly connects the core functions of the interaction between the kernel state and user state of the operating system |
4.1.3.2 Use scenarios
stay containerd It can be seen from the architecture diagram , In the construction field of the upper ecosystem , Most cloud manufacturers use CNCF The key components of cloud native serve as cloud supporting platform .
4.1.4 Pod Basic concepts of
4.1.4.1 Pod The definition of
Pod yes kubernetes Cluster architecture is the smallest unit to realize resource scheduling ,Pod Encapsulates the container object described in the above section ,Pod You can encapsulate one or more container objects , The container image corresponding to the business application can be run in each container object , therefore , One Pod The container objects in share this Pod The resources allocated , Include namespace 、cgroup Controlled, such as processor or memory related system resources 、 Network resources 、 Storage resources, etc . among ,Pod And Pod They are independent of each other and realize resource isolation . As shown below :Pod Example of deployment structure :

As shown in the figure above , The Pod Include multiple container objects ,Pod Objects within share the same storage capacity .
4.1.4.2 Pod Compiling
Kubernetes Provide a set of standard specifications support Pod Compiling , Using this specification, we can achieve Pod The application arrangement in and the scheduling of corresponding resources , An example is shown below :

Use the command to execute Pod Can run the specified Pod:
kubectl apply -f pod.yaml
4.1.4.3 Pod Life cycle of
4.1.4.3.1 Pod The stage of
One Pod The life cycle of is divided into the following stages :
Pending |
This stage represents Pod Already in kubernetes Cluster creation complete , Waiting to pull the image from the container image center to the local and run the container object and wait kubernetes Schedule the resources needed to run the container image |
Running |
This stage represents Pod Has been kubernetes Dispatch to the specified work node ,Pod All container objects in have been created , At least one container object has been running successfully or started normally or is being restarted |
Succeeded |
This stage represents Pod All container objects in have been successfully terminated , And will no longer be restarted |
Failed |
This stage represents Pod All container objects in have been successfully terminated , And at least one container object fails to be terminated , That is, the object is forcibly terminated by the system or exits stateless |
Unknown |
This stage represents kubernetes The cluster cannot get Pod Current state , Generally, it is because of network communication that we cannot communicate with Pod Work node communication |
4.1.4.3.2 Pod The state of
One Pod It is divided into the following states :
Waiting |
This state indicates Pod Waiting for other operations to complete Pod Normal start of , For example, pull the container image from the container image center to run locally 、 Perform some operations such as data encryption |
Running |
This state indicates Pod In normal operation , Can normally perform application business operations |
Terminated |
This state indicates Pod Has been successfully terminated , Application business operations have been stopped |
( To be continued )
边栏推荐
- C# EventHandler观察者模式
- 300 questions, Lecture 6, quadratic form
- Exciting metauniverse! Wealth outlet of next generation Internet
- Hololens third perspective development [nanny level tutorial] [stepping on the pit record]
- 中国经济网:“元宇宙”炙手可热
- Chapter2 Standard Output
- 数据湖:从数据仓库看数据湖
- mysql的索引的操作
- When flutter runs flutter pub get, it reports an error: "the client does not have the required privileges“
- 第四篇章:运行时数据区——共享空间
猜你喜欢

网线水晶头接法图解8根顺序

CloudCompare&PCL 点云点匹配(基于点到面的距离)

IO应知应会

Redis pseudo cluster one click deployment script - pro test available

第12届 蓝桥杯 嵌入式设计与开发项目

Chapter 4: runtime data area - shared space

Seektiger's okaleido has a big move. Will the STI of ecological pass break out?

C语言基础知识梳理(一)

mysql log理解

04_ UE4 advanced_ Introduction to physical collision and firing fireballs
随机推荐
TZC 1283: simple sort - heap sort
跳转语句与调试程序
SVG、canvas、绘制线段和填充多边形、矩形、曲线的绘制和填充
【Unity日常Bug】Unity报错Unexpected character ‘‘
Interest rate in installment payment
2022/7/22
Global event bus
Introduction to partition operators, broadcast variables and accumulators of 32 spark
How to protect the copyright of NFT digital collections?
Chapter2 Standard Output
LeetCode刷题--点滴记录023
kex_exchange_identification: read: Connection reset by peer 不完美解决办法(之一)
The difference between sprite and overridesprite in unity image (Reprint)
全局事件总线
mysql log理解
hbv参数提取和拟合[草稿]
推荐一款 Shell 装逼神器,已开源!网友:真香。。。
Reading the thesis "sentence embeddings using Siamese Bert networks"
MySQL log understanding
Clion + mingw64 configure C language development environment visual studio installation