My terraform,ansible, and kubeadm scripts for CKS exam
Prerequsites:
- terraform
- ansible
- git
- google cloud dns (publilc_zone)
Installation steps:
- git clone this repo
- review and modify the variable.tf (gcp_project, gcp_region, gcp_credentials, ssh_user, ssh_pub_key)
- terraform init
- terraform plan
- terraform deploy --auto-approve
- ssh to the master and kubectl away
Destory steps:
- terraform destroy --auto-approve
Note1: the firewalld rule depends on gcp subnet cidr. Currently it is hard coded in ansible playbook. I am considering a better way to handle this (sending terraform variable to ansible playbook).