k8s master

 

 

 

 

K8s master include apiserver, schduler, contorller manger.

Apiserver provide interface beween others, it runs both server and client when it talk to Node;  and runs as client when it talk to etcd. So it needs certifacate of both client and server.

Etcd is the database which save all the pods info etc. 

Controller manager:

1)  monitor and responding for nodes go down;   2)  responsible for mantaining the correct number of pods  ; 3) join the service and Pods

4 )  create default account and API access toekn for now namesapce

Kube- scheduler:

Monitor the pods which has no assigned nodes; once found, it select a node to run the pod ()

 

How a pod created  

1) api-server receive depployment YAML via kubectl 

2) controller manager ()will validate the depeployment (e.g token); and generate a POD with Node = NUll, and state = pending 

3) Kube scheduler find the pod with Node = Null via watch; and select a node for the POD and update the Node =1. Different alrithom avaialble here.

4) kubectl in the Node1 found it, and start the POD . Keep monitoring it. It is also done via watch. 

 

posted @ 2020-11-02 05:26  anyu686  阅读(156)  评论(0编辑  收藏  举报