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

22 lines
513 B
Bash
Raw Normal View History

2026-01-12 13:35:25 +01:00
#!/bin/bash
2026-01-27 16:04:45 +01:00
mode=${2:-demo}
branch=${3:-main}
path=${4:-.}
port=${5:-80}
portTLS=${6:-443}
2026-01-12 13:35:25 +01:00
start=1
2026-01-27 16:04:45 +01:00
end=${1:-1}
2026-01-12 13:35:25 +01:00
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
2026-01-27 16:04:45 +01:00
./start.sh $mode $branch "cluster-$i" $path $port $portTLS
2026-01-12 13:35:25 +01:00
sudo cp $HOME/.kube/config $HOME/.kube/configCluster$i
sudo chown $(id -u):$(id -g) $HOME/.kube/configCluster$i
2026-01-27 16:04:45 +01:00
export KUBECONFIG="$HOME/.kube/configCluster$i"
done