Terraform script for adding a deployment to k8s pods
Ensure you have kubectl
set up, and connect to your k8s cluster
Update the variables in /deployments/main.tf
to change deployment config
Install terraform
Create a namespace
kubectl create namespace go-apis
Export the PG_URI environment variable to connect to the remote tf state
export PG_URI=postgresql://<name>:<pw>@<host>:<port>/terraform_backend?sslmode=require
- Deploy service on each pod
make deploy
- Destroy service
make destroy
- On fresh install we need to run
make deploy
twice ?