Files
oc-deploy/k8s/start-demo.sh
2026-01-27 16:04:45 +01:00

22 lines
513 B
Bash
Executable File

#!/bin/bash
mode=${2:-demo}
branch=${3:-main}
path=${4:-.}
port=${5:-80}
portTLS=${6:-443}
start=1
end=${1:-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" $path $port $portTLS
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"
done