码迷,mamicode.com
首页 > 其他好文 > 详细

kubeadm 线上集群部署(二) k8s node 节点初始化安装

时间:2019-05-10 16:29:08      阅读:238      评论:0      收藏:0      [点我收藏+]

标签:包括   system   abc   def   地址   Plan   emctl   vip   font   

curl -s https://gitee.com/hewei8520/File/raw/master/1.13.5/lvm.sh |bash
mkdir -p /data/kubelet
ln -s /data/kubelet /var/lib/kubelet
systemctl stop docker
mv /var/lib/docker /data/
ln -s /data/docker /var/lib/docker
systemctl restart docker
# 除了将masterIP解析到hosts还包括本机地址何VIP地址
curl -s https://gitee.com/hewei8520/File/raw/master/1.13.5/base-env-config-multi-node.sh |bash
# 可选参数  --experimental-control-plane 新增master节点
kubeadm join 172.16.100.254:6443 --token abcdef.0123456789abcdef --discovery-token-ca-cert-hash sha256:6db027f8c7f8aaa23e1dac2c0f4a274d9364a3e253c3e762aed563ca3ae90dfb
systemctl stop kubelet
systemctl stop docker
sed -i s/var\/lib/data/g /lib/systemd/system/kubelet.service.d/10-kubeadm.conf
sed -i  s/Environment="KUBELET_KUBECONFIG_ARGS=/Environment="KUBELET_KUBECONFIG_ARGS=--root-dir=\/data\/kubelet  /g /lib/systemd/system/kubelet.service.d/10-kubeadm.conf
systemctl enable --now docker
systemctl enable --now kubelet
kubeadm join 172.16.100.254:6443 --token abcdef.0123456789abcdef --discovery-token-ca-cert-hash sha256:6db027f8c7f8aaa23e1dac2c0f4a274d9364a3e253c3e762aed563ca3ae90dfb 或
kubeadm join apiserver01.1ziton.com:6443 --token abcdef.0123456789abcdef --discovery-token-ca-cert-hash sha256:6db027f8c7f8aaa23e1dac2c0f4a274d9364a3e253c3e762aed563ca3ae90dfb
如果新机器是裸机,需要提前执行该命令
curl -s https://gitee.com/hewei8520/File/raw/master/1.13.5/systemd.sh |bash

 

kubeadm 线上集群部署(二) k8s node 节点初始化安装

标签:包括   system   abc   def   地址   Plan   emctl   vip   font   

原文地址:https://www.cnblogs.com/heweiblog/p/10844995.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!