ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

RKE K8S 集群增删节点

2019-09-05 15:55:50  阅读:502  来源: 互联网

标签:INFO container Successfully RKE host 增删 101.106 K8S 172.20


rke 删除节点:

修改cluster.yal 将需要删除的节点配置删除,然后运行

[root@cnvs-kubm-101-103 rke]# more cluster.yml
nodes:
  - address: 172.20.101.103
    user: ptmind
    role: [controlplane,worker,etcd]
  - address: 172.20.101.104
    user: ptmind
    role: [controlplane,worker,etcd]
  - address: 172.20.101.105
    user: ptmind
    role: [controlplane,worker,etcd]

删除#  - address: 172.20.101.106
删除#    user: ptmind
删除#    role: [worker]
删除#    labels: {traefik: traefik-outer}

执行删除节点操作

rke up --update-only

查看输出信息:

INFO[0010] [reconcile] Check etcd hosts to be deleted   
INFO[0010] [reconcile] Check etcd hosts to be added     
INFO[0010] [hosts] Cordoning host [172.20.101.106]      
INFO[0010] [hosts] Deleting host [172.20.101.106] from the cluster 
INFO[0010] [hosts] Successfully deleted host [172.20.101.106] from the cluster 
INFO[0010] [dialer] Setup tunnel for host [172.20.101.106] 
INFO[0011] [worker] Tearing down Worker Plane..         
INFO[0011] [remove/kubelet] Successfully removed container on host [172.20.101.106] 
INFO[0011] [remove/kube-proxy] Successfully removed container on host [172.20.101.106] 
INFO[0011] [remove/nginx-proxy] Successfully removed container on host [172.20.101.106] 
INFO[0011] [remove/service-sidekick] Successfully removed container on host [172.20.101.106] 
INFO[0011] [worker] Successfully tore down Worker Plane.. 
INFO[0011] [hosts] Cleaning up host [172.20.101.106]    
INFO[0011] [hosts] Running cleaner container on host [172.20.101.106] 
INFO[0012] [kube-cleaner] Successfully started [kube-cleaner] container on host [172.20.101.106] 
INFO[0012] Waiting for [kube-cleaner] container to exit on host [172.20.101.106] 
INFO[0012] Container [kube-cleaner] is still running on host [172.20.101.106] 
INFO[0013] Waiting for [kube-cleaner] container to exit on host [172.20.101.106] 
INFO[0013] [hosts] Removing cleaner container on host [172.20.101.106] 
INFO[0013] [hosts] Removing dead container logs on host [172.20.101.106] 
INFO[0014] [cleanup] Successfully started [rke-log-cleaner] container on host [172.20.101.106] 
INFO[0014] [remove/rke-log-cleaner] Successfully removed container on host [172.20.101.106] 
INFO[0014] [hosts] Successfully cleaned up host [172.20.101.106

添加节点:

修改cluster.yal 将需要添加的节点配置,然后运行

[root@cnvs-kubm-101-103 rke]# more cluster.yml
nodes:
  - address: 172.20.101.103
    user: ptmind
    role: [controlplane,worker,etcd]
  - address: 172.20.101.104
    user: ptmind
    role: [controlplane,worker,etcd]
  - address: 172.20.101.105
    user: ptmind
    role: [controlplane,worker,etcd]

  - address: 172.20.101.106
    user: ptmind
    role: [worker]
    labels: {traefik: traefik-outer}

执行添加节点操作

rke up --update-only

查看输出信息:

INFO[0025] [worker] Building up Worker Plane..          
INFO[0025] [worker] Successfully started [nginx-proxy] container on host [172.20.101.106] 
INFO[0026] [worker] Successfully started [rke-log-linker] container on host [172.20.101.106] 
INFO[0026] [remove/rke-log-linker] Successfully removed container on host [172.20.101.106] 
INFO[0027] [worker] Successfully started [kubelet] container on host [172.20.101.106] 
INFO[0027] [healthcheck] Start Healthcheck on service [kubelet] on host [172.20.101.106] 
INFO[0032] [healthcheck] service [kubelet] on host [172.20.101.106] is healthy 
INFO[0032] [worker] Successfully started [rke-log-linker] container on host [172.20.101.106] 
INFO[0033] [remove/rke-log-linker] Successfully removed container on host [172.20.101.106] 
INFO[0033] [worker] Successfully started [kube-proxy] container on host [172.20.101.106] 
INFO[0033] [healthcheck] Start Healthcheck on service [kube-proxy] on host [172.20.101.106] 
INFO[0038] [healthcheck] service [kube-proxy] on host [172.20.101.106] is healthy 
INFO[0039] [worker] Successfully started [rke-log-linker] container on host [172.20.101.106] 
INFO[0039] [remove/rke-log-linker] Successfully removed container on host [172.20.101.106] 
INFO[0039] [worker] Successfully started Worker Plane.. 

标签:INFO,container,Successfully,RKE,host,增删,101.106,K8S,172.20
来源: https://blog.51cto.com/michaelkang/2435823

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有