Terraform template to automatically deploy High-Available (HA) Kubernetes cluster on Cherryservers infrastructure. This example will create HA cluster with three control plane nodes.
+--------------+
+----|control-plane1|
| +--------------+
+-------------+ | +--------------+
kubectl-->----|load-balancer|--+--- |control-plane2|
+-------------+ | +--------------+
| +--------------+
+----|control-plane3|
+--------------+
The load balancing is powered by http://gobetween.io/
- Golang 1.12.7
- Terraform 0.12.20
- Cherryservers Terraform provider binary (build 2019-12-19)
- Kubeone v0.11.0-beta.3 (Latest release)
You will need cherrservers.com account with the credit in balance, which will be used to order services with hourly billing.
Create API key https://portal.cherryservers.com/#/settings/api-keys/ and export it to variables.tf file:
provider "cherryservers" {
auth_token = "amalkaad23asd4a8awd43a32e3492"
}
Other important variables:
- "team_id" can be optained once logged into client portal
- "region" default is "EU-East-1". "EU-West-1" supports only Bare-metal E5-1620v4
- "lb_plan_id" default is "93" SSD Smart8
- "node_plan_id" default is "96" SSD Smart16, all plans are available here
- "private_key" & "public_key" are your private and public SSH keys needed for the deployment
You can define required Kubernetes version at "config.yaml" file. The default is "v1.14", but latest now is "v1.15".
terraform apply -auto-approve
terraform output -json > tf.json
kubeone install config.yaml -t tf.json
If you get no errors here then you have succesfully have created HA kubernetes cluster.
Make sure you have installed Kubernetes CLI tools localy.
kubectl version
Copy kubernetes cluster config to local workstation
scp -r -i ~/.ssh/deployment root@control_plane_ip:/root/.kube $HOME
Replace "control_plane_ip" with the one of nodes public IP.
kubectl get nodes
kubectl describe nodes
The Dashboard UI is not deployed by default. To deploy Kubernetes Dashboard go here