去掉set -euo pipefail
This commit is contained in:
parent
e94d59b00b
commit
ebfb337d6f
@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
source cluster.env
|
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@${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"
|
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
|
cd kubeadm
|
||||||
./install.sh
|
|
||||||
./create_cluster.sh ${API_SERVER} | tee /tmp/install.log
|
./create_cluster.sh ${API_SERVER} | tee /tmp/install.log
|
||||||
|
|
||||||
# 获取安装信息
|
# 获取安装信息
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
|
|
||||||
yum install -y docker-ce-20.10/*.rpm
|
yum install -y docker-ce-20.10/*.rpm
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
|
|
||||||
ls *.tar | xargs -I {} docker load -i {}
|
ls *.tar | xargs -I {} docker load -i {}
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
|
|
||||||
ls *.tar | xargs -I {} docker load -i {}
|
ls *.tar | xargs -I {} docker load -i {}
|
||||||
kubectl taint node $(hostname) node-role.kubernetes.io/master-
|
kubectl taint node $(hostname) node-role.kubernetes.io/master-
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
if [ $(id -u) != "0" ]; then
|
if [ $(id -u) != "0" ]; then
|
||||||
echo "Error: You must be root to run this script"
|
echo "Error: You must be root to run this script"
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
yum install -y ./*.rpm
|
yum install -y ./*.rpm
|
||||||
systemctl enable --now keepalived
|
systemctl enable --now keepalived
|
@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
yum install -y 1/*
|
yum install -y 1/*
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# 初始化集群
|
# 初始化集群
|
||||||
sudo kubeadm init \
|
sudo kubeadm init \
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
yum install -y ./*.rpm
|
yum install -y ./*.rpm
|
||||||
ls *.tar | xargs -I {} docker load -i {}
|
ls *.tar | xargs -I {} docker load -i {}
|
||||||
|
Loading…
Reference in New Issue
Block a user