Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Talking about kubernetes:master Node and node Node

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The whole architecture of kubernetes is divided into master node and node node, in which the master node is responsible for the scheduling of pod, the number of replication of pod node,endpoint and the management of service accounts and tokens, etc., while the node node is mainly responsible for container creation, service proxy and other related applications.

Master node

Cluster control provided by the Master component. The Master component makes global decisions on the cluster (for example, scheduling) and detects and responds to cluster events (start a new replica when the replicas field of the replica controller is not satisfied).

The Master component can run on any node in the cluster. However, for simplicity, the setup script usually starts all Master components on the same virtual machine and does not run the user container on this virtual machine (highly available)

Master nodes include: kube-apiserver,kube-control-manager,kube-schduler,etcd, related plug-in applications and underlying cloud controllers, where:

1. Kube-apiserver

Kube-apiserver exposed Kubernetes API. It is the Kubernetes front-end control layer. It is designed to scale horizontally, that is, by deploying more instances to scale

2. Etcd database

Etcd is mainly the back-end database of kubernetes, which is stored in KBE mode, where all K8s cluster data is stored.

3. Kube-controller-manager

Kube-controller-manager run controllers, which are background threads that handle routine tasks in the cluster. Logically, each controller is a separate process, but to reduce complexity, they are compiled into separate executables and run in a single process. These controllers include:

Node controller: responsible for attention and response when the node is removed. Replica controller: responsible for maintaining the correct number of Pod for each replica controller object in the system. Endpoint controller: populates the endpoint (Endpoints) object (that is, connects Services & Pods). Service account and token controller: create a default account and API access token 4. 0 for the new namespace. Cloud Controller Manager-(cloud-controller-manager)

Cloud-controller-manager is the controller used to interact with the underlying cloud provider. The Cloud Controller Manager executable component is an Alpha feature introduced in Kubernetes v1.6.

Cloud-controller-manager runs only cloud provider-specific controller cycles. You must disable these controller loops in kube-controller-manager, which you can disable by setting the-- cloud-provider flag to external when starting kube-controller-manager.

Cloud-controller-manager allows cloud provider code and Kubernetes core to evolve independently of each other. In previous versions, Kubernetes core code relied on cloud provider-specific functional code. In future releases, the cloud provider's specific code should be maintained by the cloud provider itself and associated with the cloud controller manager running K8s. Have a cloud provider dependency:

Node controller: used to check the cloud provider to determine whether the node is deleted after the node stops responding in the cloud: used to set up routing service controllers in the underlying cloud infrastructure: used to create, update, and delete cloud provider load balancer data volume controllers: used to create, attach and mount volumes, and interact with cloud providers to coordinate volume 5. Kube-scheduler

Kube-scheduler monitors newly created Pod with no assigned nodes and selects a node for them to run, that is, the scheduling of pod

6. Plug-in (addons)

Plug-ins are Pod and Service that implement clustering functions. Pods can be managed through Deployments,ReplicationControllers. The plug-in object itself is namespace-bound and is created in the kube-system namespace. Addon Manager is used to create and maintain additional resources.

It mainly includes the following plug-ins:

DNS Domain name Registration Service

DNS records are provided for Kubernetes services, and containers launched by Kubernetes automatically include the DNS server in the DNS search.

Dashboard user interface

Provide a status overview UI interface for the kubernetes cluster.

3. Container monitoring

Container resource monitoring saves some common time series measurements about containers to a centralized database and provides an interface for browsing the data

4. Log collection

It is responsible for saving the log data of the container to a centralized log storage, which can provide search and browsing interfaces.

Node node

The node node components run on each node, maintaining the running Pod and providing a Kubernetes runtime environment. This includes the following components:

1. Kubelet

Kubelet is the primary node agent that monitors the Pod that has been assigned to its node (through apiserver or through a local configuration file) and provides the following functionality: Mount the data volumes (Volume) required by Pod.

1. Download the secrets for Pod. two。 A container that runs Pod through Docker (or through rkt). 3. Periodically detect the life cycle of the container. 4. Report the status of the Pod back to the rest of the system by creating a mirror Pod (Mirror Pod). 5. Report the status of the node back to the rest of the system 2. Kube-proxy

Kube-proxy implements the Kubernetes service proxy by maintaining network rules on the host and performing connection forwarding

3. Container runtime interface

Run the cri of the container, such as container or rkt

4. Supervisord

Supervisord is a lightweight process monitoring system that can be used to keep kubelet and docker running.

5. Fluentd

Fluentd is a daemon that helps provide cluster-level logs

Global component

The global component mainly refers to the CNI, that is, the container network, which runs through the whole kubernetes cluster, no matter the master node application or the node node application must be in the same network, so as to ensure the normal access of the whole service!

The above is the introduction of the functions related to the entire K8s node. For a specific introduction, please refer to the kubernetes official documentation!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report