- Docker
- minikube
- Skaffold
- kustomize (an old version ships with kubectl)
- google service account key. Ask an admin to create one for you.
- Google SDK (Optional, for accessing prod)
- Start the docker daemon
- Start a minikube cluster (
minikube start --memory="5g") - Use the minikube docker environment (
eval $(minikube docker-env)) - Start the skaffold dev process (
make dev)
You will need to initialize some secrets for local development
- run
make gen-secrets. This will place most of the necessary secrets in /k8s/base/ - You will need to google SA secret to be put in k8s/base/google-SA-secret.txt
skaffold delete # Destroys the cluster
minikube ssh # Enters the minikube docker conatiner
sudo rm -rf /mnt/data # make sure this is running inside the minikube node
exit # exits the minikube node
make dev # or whatever command you start the stack withWhen the SQL schema changes, you will need to run this set of commands. This will ensure that the SQL schema is updated before the new application code runs.
kubectl exec "$(kubectl get po | grep backend | awk '{print $1}')" -- python3 /app/manage.py makemigrations
kubectl cp "$(kubectl get po | grep backend | awk '{print $1}')":/app/uploads/migrations backend/uploads/migrations
kubectl cp "$(kubectl get po | grep backend | awk '{print $1}')":/app/payments/migrations backend/payments/migrationsgcloud initto login to the GCP consolegcloud container clusters listto list the clustersgcloud container clusters get-credentials $CLUSTER_NAME --region $REGIONto get k8s auth