|NO.Z.00081|——————————|^^ 部署 ^^|——|KuberNetes&kubeadm.V10|5台Server|——|kubernetes-node|Node注册到集群|

一、kubernetes-Node注册到集群
### --- Node节点注册到集群说明

~~~     Node节点上主要部署公司的一些业务应用,
~~~     生产环境中不建议Master节点部署系统组件之外的其他Pod,
~~~     测试环境可以允许Master节点部署Pod以节省系统资源。
二、k8s-node01注册到kubernetes集群中
### --- k8s-node01注册到k8s集群中
~~~     将k8s-node01注册到k8s集群中

[root@k8s-node01 ~]# kubeadm join 192.168.1.20:16443 --token oesiit.mt5fzqi8i9ascx9f \
>      --discovery-token-ca-cert-hash sha256:c09f2051501a53aaa1e158959d69d4be655d4f475c28c81b5895baddfbd59bf9
~~~     注:输出参数
This node has joined the cluster:
* Certificate signing request was sent to apiserver and a response was received.
* The Kubelet was informed of the new secure connection details.

Run 'kubectl get nodes' on the control-plane to see this node join the cluster.
### --- 查看集群状态
~~~     查看k8s-node01是否注册到集群

[root@k8s-master01 ~]# kubectl get node -owide
NAME           STATUS     ROLES                  AGE     VERSION   INTERNAL-IP    EXTERNAL-IP   OS-IMAGE                KERNEL-VERSION                CONTAINER-RUNTIME
k8s-master01   NotReady   control-plane,master   45m     v1.21.2   192.168.1.11   <none>        CentOS Linux 7 (Core)   4.19.12-1.el7.elrepo.x86_64   docker://19.3.15
k8s-master02   NotReady   control-plane,master   24m     v1.21.2   192.168.1.12   <none>        CentOS Linux 7 (Core)   4.19.12-1.el7.elrepo.x86_64   docker://19.3.15
k8s-master03   NotReady   control-plane,master   8m54s   v1.21.2   192.168.1.13   <none>        CentOS Linux 7 (Core)   4.19.12-1.el7.elrepo.x86_64   docker://19.3.15
k8s-node01     NotReady   <none>                 43s     v1.21.2   192.168.1.14   <none>        CentOS Linux 7 (Core)   4.19.12-1.el7.elrepo.x86_64   docker://19.3.15

三、k8s-node02注册到kubernetes集群中

### --- k8s-node02注册到k8s集群中
~~~     将k8s-node02注册到k8s集群中

[root@k8s-node02 ~]# kubeadm join 192.168.1.20:16443 --token oesiit.mt5fzqi8i9ascx9f \
>       --discovery-token-ca-cert-hash sha256:c09f2051501a53aaa1e158959d69d4be655d4f475c28c81b5895baddfbd59bf9
~~~     输出参数
This node has joined the cluster:
* Certificate signing request was sent to apiserver and a response was received.
* The Kubelet was informed of the new secure connection details.

Run 'kubectl get nodes' on the control-plane to see this node join the cluster.
### --- 查看集群状态
~~~     查看k8s-node02是否注册到k8s集群中
~~~     注:所有节点的状态为NotReady;安装完calico组件后会变为ready

[root@k8s-master01 ~]# kubectl get node -owide
NAME           STATUS     ROLES                  AGE     VERSION   INTERNAL-IP    EXTERNAL-IP   OS-IMAGE                KERNEL-VERSION                CONTAINER-RUNTIME
k8s-master01   NotReady   control-plane,master   47m     v1.21.2   192.168.1.11   <none>        CentOS Linux 7 (Core)   4.19.12-1.el7.elrepo.x86_64   docker://19.3.15
k8s-master02   NotReady   control-plane,master   27m     v1.21.2   192.168.1.12   <none>        CentOS Linux 7 (Core)   4.19.12-1.el7.elrepo.x86_64   docker://19.3.15
k8s-master03   NotReady   control-plane,master   11m     v1.21.2   192.168.1.13   <none>        CentOS Linux 7 (Core)   4.19.12-1.el7.elrepo.x86_64   docker://19.3.15
k8s-node01     NotReady   <none>                 3m15s   v1.21.2   192.168.1.14   <none>        CentOS Linux 7 (Core)   4.19.12-1.el7.elrepo.x86_64   docker://19.3.15
k8s-node02     NotReady   <none>                 69s     v1.21.2   192.168.1.15   <none>        CentOS Linux 7 (Core)   4.19.12-1.el7.elrepo.x86_64   docker://19.3.15

 

 
 
 
 
 
 
 
 
 

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
                                                                                                                                                   ——W.S.Landor

 

 

posted on   yanqi_vip  阅读(46)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 什么是nginx的强缓存和协商缓存
· 一文读懂知识蒸馏
· Manus爆火,是硬核还是营销?
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示