This is a PoC for using Terraform to build and deploy a Kubernetes cluster to an AWS VPC.
Currently this is a PoC, and proper security measures are not implemented.
Repeat after me: not for production use
- An Amazon Web Services account
- Potentially a few $ (this demo spawns several t2.small / m3.mediums)
- Terraform
- There's plenty of ways to do this. Remember your
keypair
name.
$ cp terraform.tfvars.tmpl terraform.tfvars
This file serves as your main config for your AWS keys etc. Use your keypair
name here. Also make sure to use your IP CIDR for allowed_network
, otherwise
you won't be able to connect to the cluster.
$ terraform apply
$ $(terraform output create-tunnel)
$ kubectl get nodes
NAME LABELS STATUS
10.0.0.110 kubernetes.io/hostname=10.0.0.110 Ready
10.0.0.16 kubernetes.io/hostname=10.0.0.16 Ready
10.0.0.52 kubernetes.io/hostname=10.0.0.52 Ready
$ open $(terraform output ui-url)
$ ssh core@$(terraform output master-ip)