把 init 内容分开

This commit is contained in:
zhanglikun 2024-01-30 16:19:24 +08:00
parent d5b1a1abe8
commit 80497e8a1a
4 changed files with 15 additions and 8 deletions

View File

@ -8,6 +8,13 @@ if [ $(id -u) != "0" ]; then
exit 1
fi
# 部署之前先分发 init 内容
scp -r init/ root@${MASTER1}:/tmp/
scp -r init/ root@${MASTER2}:/tmp/
scp -r init/ root@${MASTER3}:/tmp/
ssh root@${MASTER1} "cd /tmp/init/ && ./init.sh"
ssh root@${MASTER2} "cd /tmp/init/ && ./init.sh"
ssh root@${MASTER3} "cd /tmp/init/ && ./init.sh"
# 生成keepalived配置文件
git checkout keepalived/*.conf

View File

@ -27,8 +27,5 @@ swapoff -a
sed -i 's/.*swap.*/#&/' /etc/fstab
yum install -y ./*.rpm
cd ../docker && bash ./install.sh && cd -
cd ../kubeadm && bash ./install.sh && cd -
cd ../flannel && bash install.sh
yum install -y ./git-2.31.1/*.rpm

View File

@ -3,5 +3,9 @@ set -euo pipefail
yum install -y ./*.rpm
ls *.tar | xargs -I {} docker load -i {}
cd ../docker && bash ./install.sh && cd -
cd ../flannel && bash install.sh
systemctl enable --now kubelet

View File

@ -8,7 +8,6 @@ if [ $(id -u) != "0" ]; then
exit 1
fi
cd scripts
./init.sh
./create_cluster.sh ${API_SERVER}
./nginx_ingress.sh
./init/init.sh
./kubeadm/create_cluster.sh ${API_SERVER}
./ingress-nginx/install.sh