-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·24 lines (23 loc) · 768 Bytes
/
run.sh
File metadata and controls
executable file
·24 lines (23 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /bin/sh
case "$1" in
start)
echo "Starting stack"
cd certs/ && mkcert whoami && cd -
k3d cluster delete mycluster
k3d cluster create mycluster --api-port 6550 -p 80:80@loadbalancer -p 8080:8080@loadbalancer -p 443:443@loadbalancer --k3s-server-arg '--no-deploy=traefik' -i rancher/k3s:v1.18.6-k3s1
kubectl create secret tls mysecret --cert=certs/whoami.pem --key=certs/whoami-key.pem
# to ensure the definitions are loaded first
kubectl apply -f conf/0-traefik-crd.yml
kubectl apply -f conf/0-traefik-rbac.yml
# then load all other configurations
kubectl apply -f conf/
;;
reload)
echo "Reload resources"
kubectl apply -f conf/
;;
stop)
echo "Stopping stack"
k3d cluster delete mycluster
;;
esac