This project provides a lightweight way to standup HA Kubernetes clusters using Terraform, Ansible and Kubeadm on (initially) AWS.
- Clone the repo.
- Modify
terraform.tfvars
as desired (if you fork this repo then you'll want to edit thegit_repo
variable at the very least). - Ensure you have a valid AWS credential setup and run
terraform apply
. - When complete the script will output the command to ssh into the bastion host.
- SSH into the bastion node using the command from step 4 above.
- Move into the
/bootstrap
directory. - Modify
extra_vars.yml
as desired. - Run
ansible-playbook -i inventory.ini -e @extra_vars.yml terr-ible-k8s/ansible/install.yml
. - When complete, kubectl on the bastion node should be available and setup to communicate with the cluster. The kubeconfig can be copied elsewhere from the
/home/ubuntu/.kube/config
file.
Note: Currently only tested with 1.13.x & 1.14.x
- SSH into the bastion node.
- Move into the
/bootstrap
directory. - Either modify
extra_vars.yml
or add override-e
flags in the following step for desired configuration. - Run
ansible-playbook -i inventory.ini -e @extra_vars.yml terr-ible-k8s/ansible/upgrade.yml
. - When complete, verify that all nodes are upgraded by running
kubectl get nodes
.
This project is provided with no support, but if you find bugs please file an issue. I'm no Terraform or Ansible expert either, so PRs also welcome.