The project provides Terraform scripts to automate the provisioning of a kubernetes cluster on Openstack IaaS. Using these scripts for production grade deployments isn't recommended as it doesn't support multi master HA.
You can quickly provision a cluster following these steps:
- Install terraform >0.11 on your local Linux env
- Git clone the repo
- Download your openstack provider RC file and source it. It precises the
OS_USERNAME
andOS_PASSWORD
env variables. You can alternatively manually export them - Create a directory for each required environment in <PROJECT_ROOT>/env/<CLUSTER_NAME> and copy the tfvars file in it from <PROJECT_ROOT>/env/example.
- Modify the terraform.tfvars to match your Openstack cloud provider variables and project common variables if you don't want to use defaults. External public access is possible with a dynamic DNS, precise it before building the cluster to put the DNS name in certificates. The Kubernetes token can be generated with
go run tokens.go
- Initiate Terraform to download the required Terraform modules with
INSTANCE=<CLUSTER_NAME> make init
- Get Terraform with
INSTANCE=<CLUSTER_NAME> make get
- Build the cluster with
INSTANCE=<CLUSTER_NAME> make apply
- Use the kubeconfig downloaded by Terraform in current directory to access the cluster
- If you want to stop and erase the infrastructure
INSTANCE=<CLUSTER_NAME> make destroy