From 4773b85c23e4837db37fd7398e3e0ed5fdffd931 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 2 Feb 2024 02:19:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cluster.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cluster.sh b/cluster.sh index ed744c6..6291233 100755 --- a/cluster.sh +++ b/cluster.sh @@ -50,11 +50,10 @@ ssh root@${MASTER2} "cd /tmp/flannel/ && bash install.sh" ssh root@${MASTER3} "cd /tmp/flannel/ && bash install.sh" # 创建集群 -cd kubeadm -./create_cluster.sh ${API_SERVER} | tee /tmp/install.log +ssh root@${MASTER1} "cd /tmp/kubeadm && ./create_cluster.sh ${API_SERVER} | tee /tmp/install.log" # 获取安装信息 -MASTER_JOIN_COMMAND=$(cat /tmp/install.log | grep -A 5 "You can now join any number of the control-plane" | grep -vE "You can now join any number of the control-plane|^$") +MASTER_JOIN_COMMAND=$(ssh root@${MASTER1} 'cat /tmp/install.log | grep -A 5 "You can now join any number of the control-plane" | grep -vE "You can now join any number of the control-plane|^$."') ssh root@${MASTER2} "${MASTER_JOIN_COMMAND}" -ssh root@${MASTER3} "${MASTER_JOIN_COMMAND}" \ No newline at end of file +ssh root@${MASTER3} "${MASTER_JOIN_COMMAND}"