forked from easzlab/kubeasz
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
|
||
- 集群状态检查 | ||
- 集群扩容 | ||
- node 节点扩容 | ||
- [node 节点扩容](op/AddNode.md) | ||
- master 节点扩容 | ||
- etcd 集群扩容 | ||
- 清理集群 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
## 增加 kube-node 节点 | ||
|
||
新增`kube-node`节点大致流程为: | ||
- 1. 节点预处理 prepare | ||
- 2. 安装 kubectl (可选) | ||
- 3. 安装 docker | ||
- 4. 安装 kubelet 和 kube-proxy | ||
- 5. 准备网络插件 calico 或 flannel | ||
- 6. 批准新节点 kubectl certificate approve | ||
|
||
### 操作步骤 | ||
|
||
按照本项目说明,首先确保deploy节点能够ssh免密码登陆新增节点,然后在**deploy**节点执行两步: | ||
|
||
- 1. 修改ansible hosts 文件,在 [new-node] 组编辑需要新增的节点,例如: | ||
|
||
``` bash | ||
... | ||
# 预留组,后续添加node节点使用 | ||
[new-node] | ||
192.168.1.6 NODE_ID=node6 NODE_IP="192.168.1.6" | ||
... | ||
``` | ||
- 2. 执行安装脚本 | ||
|
||
``` bash | ||
$ cd /etc/ansible && ansible-playbook 20.addnode.yml | ||
``` | ||
|
||
### 验证 | ||
|
||
``` bash | ||
# 验证新节点状态 | ||
$ kubectl get node | ||
|
||
# 验证新节点的网络插件calico 或flannel 的Pod 状态 | ||
$ kubectl get pod -n kube-system | ||
|
||
# 验证新建负载能否调度到新节点,略 | ||
``` | ||
|
||
### 后续 | ||
|
||
上述步骤验证成功,确认新节点工作正常后,为了方便后续再次添加节点,在ansible hosts文件中,把 [new-node] 组下的节点全部复制到 [kube-node] 组下,并清空 [new-node] 组的节点。 |