Files
oc-deploy/k8s/start-demo.sh

22 lines
500 B
Bash
Raw Permalink Normal View History

2026-01-12 13:35:25 +01:00
#!/bin/bash
mode=${1:-demo}
branch=${2:-main}
start=1
end=${3:-1}
cp $HOME/.kube/config $HOME/.kube/config_past
for ((i=start; i<=end; i++)); do
sudo cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config
./start.sh $mode $branch "cluster-$i"
sudo cp $HOME/.kube/config $HOME/.kube/configCluster$i
sudo chown $(id -u):$(id -g) $HOME/.kube/configCluster$i
export KUBECONFIG="$HOME/.kube/configCluster$i"
cd ./oc-deploy/k8s
done
export KUBECONFIG=~/.kube/config