copy kubeconfig file to rke2 folder

This commit is contained in:
James Turland 2023-11-03 10:04:17 +00:00
parent 3ef9a77921
commit 029134e214

View file

@ -153,6 +153,7 @@ token=`cat token`
sudo cat ~/.kube/rke2.yaml | sed 's/127.0.0.1/'$vip'/g' > $HOME/.kube/config sudo cat ~/.kube/rke2.yaml | sed 's/127.0.0.1/'$vip'/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
sudo cp ~/.kube/config /etc/rancher/rke2/rke2.yaml
kubectl get nodes kubectl get nodes
# Step 6: Add other Masternodes, note we import the token we extracted from step 3 # Step 6: Add other Masternodes, note we import the token we extracted from step 3