-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathk8s-node
17 lines (17 loc) · 883 Bytes
/
k8s-node
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
( yum install -y kubelet-$k8s_version-0 docker
yum install -y kubeadm-$k8s_version-0 kubectl-$k8s_version-0
systemctl enable docker kubelet
systemctl restart docker kubelet
kubeadm config images list --kubernetes-version $k8s_version | xargs -n1 -P0 docker pull &
url="https://install.portworx.com/$(cut -f 1,2 -d . <<<$version)?kbver=$k8s_version&b=true&c=$cluster_name-$c&stork=true&st=k8s&lh=true"
curl -so /tmp/px.yml $url
[ "$version" ] && sed -ri s/oci-monitor:[0-9\.]+/oci-monitor:$version/ /tmp/px.yml
cat /tmp/px.yml | awk '/image: /{print $2} /oci-monitor/{sub(/oci-monitor/,"px-enterprise",$2);print$2}' | sort -u | xargs -n1 -P0 docker pull &
while : ; do
command=$(ssh -oConnectTimeout=1 -oStrictHostKeyChecking=no master-$c kubeadm token create --print-join-command)
[ $? -eq 0 ] && break
sleep 5
done
wait
eval $command
echo End ) >&/var/log/vagrant.bootstrap &