K8S学习笔记(4)-增加node节点
版权声明 本站原创文章 由 萌叔 发表 转载请注明 萌叔 | http://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 ...