Problem scenario
You want to use Terraform and Kubernetes (in EKS). How do you do this in a simple way to test it out?
Solution
Prerequisite
This assumes you have deployed EKS. If you need assistance, see this posting.
This assumes you have installed Terraform. If you need assistance, see this posting.
Procedures
- This first step is optional. Log into the AWS Management Console, and go here. Take a screenshot.
- Go to the back-end server with Terraform. Run these commands:
git clone https://github.com/hashicorp/learn-terraform-provision-eks-cluster
cd learn-terraform-provision-eks-cluster/
terraform init
terraform plan # This command is optional
terraform apply
# It may take 20 minutes. This step "module.eks.aws_eks_cluster.this[0]: Still creating... " may take 15 minutes by itself. Be patient.
- This step is optional. Go back to the web UI and refresh the web page to view the new VPC changes.
- Go back to the command prompt and run this command to rollback the changes:
terraform destroy