In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
For every engineer who wants to land the kubernetes application, it is necessary to be familiar with the architecture and working principle of kubernetes, and it is also a must to know the knowledge. Only by understanding the architecture and working principle of kubernetes can we better apply kubernetes.
The overall architecture of kubernetes
Kubernetes originally originated from Google's internal Borg and provides an application-oriented container cluster deployment and management system, so the overall architecture is very similar to borg. The entire architecture is completed by api server,control manager,scheduler,etcd,kubelet,kube-proxy,network-plugin and other related components. The overall architecture is as follows:
Where:
Api server,Control manager,Scheduler,Etcd belongs to the master node, and the functions of related components are as follows:
1.Etcd: saves the state of the entire cluster; 2.Apiserver: provides a unique entry for resource operation, and provides mechanisms such as authentication, authorization, access control, API registration and discovery; 3.Controller manager: responsible for maintaining the state of the cluster, such as fault detection, automatic extension, rolling updates, etc.; 4.Scheduler: responsible for resource scheduling, scheduling Pod to the corresponding machine according to the scheduled scheduling policy
Kubelet,Container runtine,Kube-proxy belongs to the woker node, and the functions of related components are as follows:
1.kubelet: responsible for maintaining the life cycle of the container, but also responsible for the management of Volume (CSI) and CNI; 2.Container runtime: responsible for image management and real operation of Pod and container (CRI); 3.kube-proxy: responsible for providing service discovery and load balancing within cluster for Service; how kubernetes works
The following is the entire workflow flow chart of kubernetes:
Here is the process for creating each pod:
1. Users can submit a request to create a Pod through API Server's REST API or Kubectl command line tool, which supports both Json and Yaml formats.
2.API Server processes user requests and stores Pod data to etcd
3.Schedule looks at the new Pod through the watch mechanism of API Server and tries to bind Node to Pod.
4. Filter hosts: the scheduler uses a set of rules to filter out hosts that do not meet the requirements. For example, if Pod specifies the required resources, it is necessary to filter out hosts with insufficient resources.
5. Host scoring: score the hosts selected in the first step to meet the requirements. In the host scoring phase, the scheduler will consider some overall optimization strategies, such as distributing a copy of Replication Controller to different hosts, using the hosts with the lowest load, etc.
6. Select host: select the host with the highest score, perform binding operation, and store the result in etcd
7.Kubelet performs Pod creation operation based on the scheduling result: after the binding is successful, container,docker run,scheduler is started and API is called to create a bound pod object in the database etcd that describes all the pod information bound and running on a work node. Kubelet running on each worker node also periodically synchronizes bound pod information with etcd. Once it is found that the bound pod object that should be running on that worker node is not updated, call Docker API to create and start the container in the pod.
During this period, Control Manager also executes the number of rc pod based on the mainfiles file of kubernetes to guarantee the specified number of pod copies. Other components, such as scheduler, are responsible for scheduling the pod binding, thus completing the creation of the entire pod.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.