fuckeduppdp/bootstrap-k8s.sh

23 lines
520 B
Bash
Raw Normal View History

2023-10-26 01:25:51 +00:00
#!/bin/bash
set -e
usage () {
echo "usage: $0 tag disk_filename"
exit 1
}
[[ $# -eq 1 ]] || usage
2023-10-26 01:25:51 +00:00
tag="$1"
cd "$(dirname $0)"
sed "s!<TAG>!${tag}!" ./k8s/deployment.yaml.template > ./k8s/deployment.yaml
echo "Creating PVC..."
kubectl apply -f ./k8s/pvc.yaml
echo "Creating PDP deployment..."
kubectl apply -f ./k8s/deployment.yaml
echo "Creating services..."
for i in ./k8s/svc-*.yaml; do kubectl apply -f "$i"; done
echo "Done! Optionally, run ./misc/configure-metallb.sh to put the services on an external IP."