mirror of
https://github.com/MichaelCade/90DaysOfDevOps.git
synced 2025-01-10 07:06:38 +07:00
14 lines
443 B
Bash
14 lines
443 B
Bash
#! /bin/bash
|
|
|
|
/bin/bash /vagrant/configs/join.sh -v
|
|
|
|
sudo -i -u vagrant bash << EOF
|
|
mkdir -p /home/vagrant/.kube
|
|
sudo cp -i /vagrant/configs/config /home/vagrant/.kube/
|
|
sudo chown 1000:1000 /home/vagrant/.kube/config
|
|
NODENAME=$(hostname -s)
|
|
kubectl label node $(hostname -s) node-role.kubernetes.io/worker=worker-new
|
|
EOF
|
|
|
|
sudo systemctl restart systemd-resolved
|
|
sudo swapoff -a && sudo systemctl daemon-reload && sudo systemctl restart kubelet |