去掉set -euo pipefail

This commit is contained in:
zhanglikun 2024-01-30 18:09:22 +08:00
parent e94d59b00b
commit ebfb337d6f
10 changed files with 5 additions and 14 deletions

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -euo pipefail
source cluster.env
@ -35,9 +34,13 @@ ssh root@${MASTER1} "cd /tmp/keepalived/ && bash install.sh && cp -r keepalived1
ssh root@${MASTER2} "cd /tmp/keepalived/ && bash install.sh && cp -r keepalived2.conf /etc/keepalived/keepalived.conf && systemctl restart keepalived"
ssh root@${MASTER3} "cd /tmp/keepalived/ && bash install.sh && cp -r keepalived3.conf /etc/keepalived/keepalived.conf && systemctl restart keepalived"
# 安装 kubeadm 组件
ssh root@${MASTER1} "cd /tmp/kubeadm/ && bash install.sh"
ssh root@${MASTER2} "cd /tmp/kubeadm/ && bash install.sh"
ssh root@${MASTER3} "cd /tmp/kubeadm/ && bash install.sh"
# 创建集群
cd kubeadm
./install.sh
./create_cluster.sh ${API_SERVER} | tee /tmp/install.log
# 获取安装信息

View File

@ -1,6 +1,4 @@
#!/bin/bash
set -euo pipefail
yum install -y docker-ce-20.10/*.rpm

View File

@ -1,5 +1,3 @@
#!/bin/bash
set -euo pipefail
ls *.tar | xargs -I {} docker load -i {}

View File

@ -1,6 +1,4 @@
#!/bin/bash
set -euo pipefail
ls *.tar | xargs -I {} docker load -i {}
kubectl taint node $(hostname) node-role.kubernetes.io/master-

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -euo pipefail
if [ $(id -u) != "0" ]; then
echo "Error: You must be root to run this script"

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -euo pipefail
yum install -y ./*.rpm
systemctl enable --now keepalived

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -euo pipefail
yum install -y 1/*

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -euo pipefail
# 初始化集群
sudo kubeadm init \

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -euo pipefail
yum install -y ./*.rpm
ls *.tar | xargs -I {} docker load -i {}

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -euo pipefail
source single.env