Create a simple eks cluster with bastion host support on AWS
Steps:
- Edit the variables.tf and terraform.tfvars under bastion_host directory and update the names and values of the variables.
- Set the kubernetes verion in main_eks.tf (The current version is 1.20)
- Run terraform commands to deploy eks cluster.
The deployment will create an eks cluster and update the config map (aws_auth) in kube-system namespace with instance role name with admin permission.
- If the cluster is ready, run the bastion host deployment,too. Navigate to bastion_host directory and:
- update the names and values of the variables in variables.tf and terraform.tfvars
- update the instance number (if you want) in ec2.tf (The current min_size is 1)
- Run terraform commands to deploy bastion host(s).
- Download the private key from secrets manager, and set the right permission on the file (chmod 0400) and connect to bastion host and use kubectl command to reach the cluster.