fix run of whitespaces, shfmt, indentations
This commit is contained in:
parent
39883fa083
commit
50c7274c95
|
@ -15,7 +15,6 @@ echo -e " \033[36;5m \
|
||||||
echo -e " \033[32;5m https://youtube.com/@jims-garage \033[0m"
|
echo -e " \033[32;5m https://youtube.com/@jims-garage \033[0m"
|
||||||
echo -e " \033[32;5m \033[0m"
|
echo -e " \033[32;5m \033[0m"
|
||||||
|
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
# YOU SHOULD ONLY NEED TO EDIT THIS SECTION #
|
# YOU SHOULD ONLY NEED TO EDIT THIS SECTION #
|
||||||
#############################################
|
#############################################
|
||||||
|
@ -77,8 +76,7 @@ chmod 600 /home/$user/.ssh/$certName
|
||||||
chmod 644 /home/$user/.ssh/$certName.pub
|
chmod 644 /home/$user/.ssh/$certName.pub
|
||||||
|
|
||||||
# Install Kubectl if not already present
|
# Install Kubectl if not already present
|
||||||
if ! command -v kubectl version &> /dev/null
|
if ! command -v kubectl version &>/dev/null; then
|
||||||
then
|
|
||||||
echo -e " \033[31;5mKubectl not found, installing\033[0m"
|
echo -e " \033[31;5mKubectl not found, installing\033[0m"
|
||||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
||||||
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
|
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
|
||||||
|
@ -126,7 +124,10 @@ echo " - rke2-ingress-nginx" >> config.yaml
|
||||||
sudo cp ~/config.yaml /etc/rancher/rke2/config.yaml
|
sudo cp ~/config.yaml /etc/rancher/rke2/config.yaml
|
||||||
|
|
||||||
# update path with rke2-binaries
|
# update path with rke2-binaries
|
||||||
echo 'export KUBECONFIG=/etc/rancher/rke2/rke2.yaml' >> ~/.bashrc ; echo 'export PATH=${PATH}:/var/lib/rancher/rke2/bin' >> ~/.bashrc ; echo 'alias k=kubectl' >> ~/.bashrc ; source ~/.bashrc ;
|
echo 'export KUBECONFIG=/etc/rancher/rke2/rke2.yaml' >>~/.bashrc
|
||||||
|
echo 'export PATH=${PATH}:/var/lib/rancher/rke2/bin' >>~/.bashrc
|
||||||
|
echo 'alias k=kubectl' >>~/.bashrc
|
||||||
|
source ~/.bashrc
|
||||||
|
|
||||||
# Step 2: Copy kube-vip.yaml and certs to all masters
|
# Step 2: Copy kube-vip.yaml and certs to all masters
|
||||||
for newnode in "${allmasters[@]}"; do
|
for newnode in "${allmasters[@]}"; do
|
||||||
|
@ -155,7 +156,7 @@ EOF
|
||||||
echo -e " \033[32;5mMaster1 Completed\033[0m"
|
echo -e " \033[32;5mMaster1 Completed\033[0m"
|
||||||
|
|
||||||
# Step 4: Set variable to the token we just extracted, set kube config location
|
# Step 4: Set variable to the token we just extracted, set kube config location
|
||||||
token=`cat token`
|
token=$(cat token)
|
||||||
sudo cat ~/.kube/rke2.yaml | sed 's/127.0.0.1/'$master1'/g' >$HOME/.kube/config
|
sudo cat ~/.kube/rke2.yaml | sed 's/127.0.0.1/'$master1'/g' >$HOME/.kube/config
|
||||||
sudo chown $(id -u):$(id -g) $HOME/.kube/config
|
sudo chown $(id -u):$(id -g) $HOME/.kube/config
|
||||||
export KUBECONFIG=${HOME}/.kube/config
|
export KUBECONFIG=${HOME}/.kube/config
|
||||||
|
|
Loading…
Reference in New Issue