GCP infrastructure experiments using Terraform and Ansible.
| Directory | Description |
|---|---|
spot-kind |
Single SPOT VM running a 2-node kind (Kubernetes-in-Docker) cluster. Fast to provision (~3 min), cheap to run. |
spot-kind-submariner |
Three SPOT VMs each running a kind cluster, linked via Submariner for cross-cluster pod networking and service discovery. |
min-gke |
Minimal cost GKE cluster with preemptible nodes, autoscaling, and Ansible-driven configuration. |
-
Terraform >= 1.0
brew install terraform
-
Google Cloud SDK
brew install google-cloud-sdk gcloud auth application-default login
-
Ansible >= 2.10
pip install ansible
-
kubectl
brew install kubectl
-
subctl (spot-kind-submariner only)
brew install submariner-io/submariner/subctl
-
direnv (optional, for automatic KUBECONFIG switching)
brew install direnv direnv allow # run in each project dir after cloning
Each project uses a GCP project ID set in variables.tf. Authenticate before running:
gcloud auth application-default login
gcloud config set project <your-project-id>Enable required APIs:
gcloud services enable compute.googleapis.com container.googleapis.comEach project generates its own SSH key pair via make keys. Keys are excluded from git (.gitignore).
cd spot-kind
make create # provision VM + kind cluster (~3 min)
kubectl get nodes # uses kubeconfig.yaml in the directory
make destroy # tear down