差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版 前次修改
下次修改
前次修改
tech:rke-k8s [2021/04/07 19:28] jonathantech:rke-k8s [2022/07/19 16:55] (目前版本) – [關閉 rke (移除 K8s Cluster)] jonathan
行 169: 行 169:
 </cli> </cli>
  
 +===== 新增與移除 K8s Node ====
 +  * 只要修改 cluster.yml 節點資料, 再執行以下指令即可 <cli>rke up --update-only --config cluster.yml </cli>
 +  * Exp. 加上 10.20.0.36
 +    * 前面所有節點準備程序都要進行
 +    * 修改 cluster.yml <file>
 +nodes:
 +- address: 10.20.0.35
 +  port: "22"
 +  internal_address: 10.20.0.35
 +  role:
 +  - controlplane
 +  - worker
 +  - etcd
 +  hostname_override: ""
 +  user: rkeuser
 +  docker_socket: /var/run/docker.sock
 +  ssh_key: ""
 +  ssh_key_path: ~/.ssh/id_rsa
 +  ssh_cert: ""
 +  ssh_cert_path: ""
 +  labels: {}
 +  taints: []
 +- address: 10.20.0.36
 +  port: "22"
 +  internal_address: 10.20.0.36
 +  role:
 +  - worker
 +  hostname_override: ""
 +  user: rkeuser
 +  docker_socket: /var/run/docker.sock
 +  ssh_key: ""
 +  ssh_key_path: ~/.ssh/id_rsa
 +  ssh_cert: ""
 +  ssh_cert_path: ""
 +  labels: {}
 +  taints: []
 +- address: 10.20.0.37
 +  port: "22"
 +  internal_address: 10.20.0.37
 +  role:
 +  - worker
 +  hostname_override: ""
 +  user: rkeuser
 +  docker_socket: /var/run/docker.sock
 +  ssh_key: ""
 +  ssh_key_path: ~/.ssh/id_rsa
 +  ssh_cert: ""
 +  ssh_cert_path: ""
 +  labels: {}
 +  taints: []
 +services:
 +  etcd:
 +:
 +:
 +</file>
 +  * 執行更新 <cli>
 +rke up --update-only --config cluster.yml
 +</cli>
 +
 +===== 關閉 rke (移除 K8s Cluster) ====
 +  * 直接執行 rke remove 就會將 K8s 移除 <cli>
 +rke remove --config cluster.yml
 +</cli>
 +  * 執行後原本運行中的 rancher 服務還會持續運行, 可以透過重新開機解決
  
 ===== 參考網址 ===== ===== 參考網址 =====
   * https://www.mdeditor.tw/pl/glor/zh-tw   * https://www.mdeditor.tw/pl/glor/zh-tw
 +  * https://rancher.com/docs/rke/latest/en/managing-clusters/
  
-{{tag>RKE K8s}}+{{tag>Rancher RKE K8s}}
  • tech/rke-k8s.1617794915.txt.gz
  • 上一次變更: 2021/04/07 19:28
  • jonathan