Fork me on GitHub

版权声明 本站原创文章 由 萌叔 发表
转载请注明 萌叔 | https://vearne.cc

1. 前言

警告:本文仅用于萌叔自己总结之用,对其它人而言可能毫无营养,没有阅读价值。

本文使用的安装工具为easzlab/kubeasz

2. 步骤

2.1 修改docker目录

通过软连接的方式修改docker 数据存储路径

ansible new-node -i hosts  -m shell -a 'mkdir /data/docker'
ansible new-node -i hosts  -m shell -a 'cd /var/lib/ && ln -s /data/docker docker'

2.2 安装gluster fs依赖

如果pod需要用到gluster fs才需要执行此步骤

ansible new-node -i hosts  -m shell -a 'yum install centos-release-gluster glusterfs-fuse -y'

2.3 安装ntpd确保时钟同步

# 安装ntd
ansible new-node -i hosts  -m shell -a 'yum -y install ntp'
# 设置开机自启动
ansible new-node -i hosts  -m shell -a 'systemctl enable ntpd'
# 启动ntpd服务
ansible new-node -i hosts  -m shell -a 'systemctl start ntpd'
# 手动执行一次同步
ansible new-node -i hosts  -m shell -a 'ntpdate -u 0.centos.pool.ntp.org'

2.4 添加新节点

easzctl add-node 192.168.1.11

新增kube-node节点大致流程为:tools/02.addnode.yml 见参考资料1

参考资料

  1. kubeasz-管理node节点

请我喝瓶饮料

微信支付码

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据