fuckeduppdp/bootstrap-k8s.sh

23 lines
520 B
Bash
Executable File

#!/bin/bash
set -e
usage () {
echo "usage: $0 tag disk_filename"
exit 1
}
[[ $# -eq 1 ]] || usage
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."