Kubernetes overall architecture diagram

Link to the original text: http://click.aliyun.com/m/27084/
1. Overall architecture of Kubernetes 2. Introduction to various components of Kubernetes (1) kube-master [control node] master workflow , such as creating a Pod and sending it to the Kubernetes Client.

The CSDN blog address of this article: http://blog.csdn.net/huwh_/article/details/71308171

1. The overall architecture diagram of Kubernetes
Center
2. Introduction to the various components of Kubernetes
(1) kube-master [control node]
master workflow Figure

Kubecfg sends specific requests, such as creating Pods, to the Kubernetes Client.

The Kubernetes Client sends the request to the API server.

API Server selects which REST Storage API to process the request according to the type of request, for example, when creating a Pod, the storage type is pods.

The REST Storage API handles the request accordingly.

Store the processed results in the high-availability key-value storage system Etcd.

After the API Server responds to the Kubecfg request, the Scheduler obtains information about the running Pod and Minion/Node in the cluster according to the Kubernetes Client.

Based on the information obtained from the Kubernetes Client, the Scheduler distributes the undistributed Pods to the available Minion/Node nodes.

1. API Server [resource operation entry]
provides the only operation entry for resource objects. All other components must operate resource data through the API provided by it. Only API Server communicates with storage, and other modules access cluster status through API Server.

The first is to ensure the security of cluster state access.

Second, it is to isolate the way of cluster state access and the way of back-end storage implementation: API Server is the way of state access, which will not change due to the change of the back-end storage technology etcd.

As the entrance of the kubernetes system, it encapsulates the addition, deletion, modification, and query operations of core objects, and provides it to external customers and internal component calls in the form of RESTFul interface. For related resource data "full query" + "change monitoring", related business functions are completed in real time.

2. Controller Manager [internal management control center]
realizes the automation of cluster fault detection and recovery, and is responsible for executing various controllers, mainly including:

endpoint-controller: regularly associates service and pod (association information is maintained by endpoint objects) to ensure service The mapping to pods is always up to date.

replication-controller: Periodically associate replicationController and pod to ensure that the number of replications defined by replicationController is always consistent with the actual number of running pods.

3. Scheduler [cluster distribution scheduler]
The Scheduler collects and analyzes the resource (memory, CPU) load of all Minion nodes in the current Kubernetes cluster, and then distributes the newly created Pods to the available nodes in the Kubernetes cluster accordingly.

Real-time monitoring of all running Pods in a Kubernetes cluster, both undistributed and distributed.

The Scheduler also monitors the Minion node information. Since the Minion node is frequently searched, the Scheduler will cache a copy of the latest information locally.

Finally, after the Scheduler distributes the Pod to the specified Minion node, it will write the Pod-related information Binding back to the API Server.

(2) kube-node [service node]
kubelet structure Figure

1, Kubelet [Pod steward on the node]
is responsible for the management of the entire life cycle of pod creation, modification, monitoring, deletion, etc. on the Node node, and

regularly reports the status information of this Node to API Server.

The kubelet is the bridge between the Master API Server and the Minion. It receives the commands and work assigned to it by the Master API Server, interacts with the persistent key-value stores etcd, file, server and http, and reads the configuration information.

The specific work is as follows:

set the environment variables of the container, bind the Volume to the container, bind the Port to the container, run a single container according to the specified Pod, and create a network container for the specified Pod.

Synchronize the state of the Pod, synchronize the state of the Pod, get Container info, pod info, root info, machine info from cAdvisor.

Run commands in the container, kill the container, delete all containers of the pod.

2. Proxy [load balancing, routing and forwarding]
Proxy is designed to solve the problem that the external network can access the application services provided by the containers in the cross-machine cluster, and runs on each Node. Proxy provides a proxy for TCP/UDP sockets. Each time a Service is created, the Proxy mainly obtains the configuration information of Services and Endpoints from etcd (it can also be obtained from file), and then starts a Proxy process on Minion according to the configuration information and monitors the corresponding Service port. When an external request occurs, the Proxy will distribute the request to the correct backend container for processing according to the Load Balancer.

Proxy not only solves the problem of the same service port conflict on the same host, but also provides the ability of Service to forward service ports to provide services to the outside world. The Proxy backend uses a random and round-robin load balancing algorithm.

3. kubectl (kubelet client) [cluster management command line tool set]
Through the client's kubectl command set operation, the API Server responds to the corresponding command results, so as to achieve the management of the kubernetes cluster.

Reference article:

https://yq.aliyun.com/articles/47308?spm=5176.100240.searchblog.19.jF7FFa



Copyright statement: The content of this article is contributed by Internet users, and this community does not own the ownership and does not assume relevant legal responsibility. If you find any content suspected of plagiarism in this community, please send an email to: [email protected] to report and provide relevant evidence. Once verified, this community will immediately delete the allegedly infringing content.
Original link: http://click.aliyun.com/m/27084/

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327038138&siteId=291194637