Get the App
SLTechnology News&Howtos  ›  Servers  › 

K8s deployment-node node component deployment (4)

Shulou Source: shulou.com Published: 2022-06-02 03:08:30 10月03日 Update

Kubelet is a distributed cluster management system. On each node, a worker is run to manage the lifecycle of containers. The main function of kubelet is to obtain the expected state of pod/container on a node from a certain place at regular intervals (what container is running, the number of replicas running, how the network or storage is configured, etc.), and call the corresponding container platform interface to achieve this state. Kubelet component features regularly report the status of the current node to apiserver, for scheduling when using mirrors and container cleaning work, to ensure that the mirror on the node does not occupy full disk space, exiting the container does not occupy too much resources to run HTTP Server, to provide external node and pod information, if in debug mode, including debugging information, etc... Kubelet main function Pod management container health check container monitoring kube-proxy component introduction to implement Pod network proxy on node, maintain network planning and four-layer Load Balancer work Experimental deployment Experimental environmentMaster01:192.168.80.12Node01: 192.168.80.13Node02:192.168.80.14 This experimental deployment is continued from the previous article master node deployment Continue deployment, the experimental environment remains unchanged, this article mainly deploys kubelet component and kube-proxy component in node deployment master01 Server operation [root@master01 k8s]# cd /root/k8s/kubernetes/server/bin //Enter the command directory [root@master01 bin]# lsapiextensions-apiserver kube-apiserver.docker_tag kube-proxycloud-controller-manager kube-apiserver.tar kube-proxy.docker_tagcloud-controller-manager.docker_tag kube-controller-manager kube-proxy.tarcloud-controller-manager.tar kube-controller-manager.docker_tag kube-schedulerhyperkube kube-controller-manager.tar kube-scheduler.docker_tagkubeadm kubectl kube-scheduler.tarkube-apiserver kubelet mounter[root@master01 bin]# scp kubelet kube-proxy root@192.168.80.13:/opt/kubernetes/bin/ //copy kubelet and kube-proxy to the node node to root@192.168.80.13's password:kubelet 100% 168MB 91.4MB/s 00:01kube-proxy 100% 48MB 71.8MB/s 00:00[root@master01 bin]# scp kubelet kube-proxy root@192.168.80.14:/opt/kubernetes/bin/root@192.168.80.14's password:kubelet 100% 168MB 122.5MB/s 00:01kube-proxy 100% 48MB 95.2MB/s 00:00[root@master01 bin]# scp /mnt/node.zip root@192.168.80.13:/root //Copy the compressed file mounted on the host to node01 root@192.168.80.13's password: node.zip 100% 1240 4.1KB/s 00:00node01 node operation [root@node01 ~]# lsanaconda-ks.cfg flannel.sh flannel-v0.10.0-linux-amd64.tar.gz node.zip README.md[root@node01 ~]# unzip node.zip Archive: node.zipinflating: proxy.shinflating: kubelet.sh

master01 node operation

[root@master01 bin]# cd /root/k8s/[root@master01 k8s]# mkdir kubeconfig //Create profile directory [root@master01 k8s]# cd kueconfig [root@master01 kueconfig]# cp /mnt/www.example.com/root/k8s/kueconfig/kubeconfig.sh //Copy script to profile directory [root@master01 kubeconfig]# mv kubeconfig.sh kubeconfig //rename [root@master01 kubeconfig]# vim kubeconfig //Edit File #Create TLS Bootstrapping Token#BOOTSTRAP_TOKEN=$(head -c 16 /dev/urrandom| od -An -t x | tr -d ' ')BOOTSTRAP_TOKEN=0fb61c46f8991b718eb38d27b605b008cat > token.csv

Tags: Node file configuration container copy service component success directory status certificate generate run script experiment command address environment network management Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia vpn Linux Microsoft Shulou Technology