- You need to have admin access to AWS account with required services:
- EKS
- IAM
- EC2
- VPC
- S3
-
You need to have terraform v0.12.24+
-
AWS CLI version: aws-cli/1.18.39+
Change your bucket_name
if it exists in terraform apply
command
Create buket:
cd aws_s3_bucket
terraform init
terraform apply -var 'bucket_name=terraform-aws-configuration' --auto-approve
Change your bucket_name to value as provided in Create s3 bucket
step
- Init terraform on first run:
cd terraform
terraform init -backend-config='bucket=terraform-aws-configuration' -backend-config=region='eu-west-1'
- Set your public IP in variable during next command run like "10.10.10.10/32":
terraform apply --auto-approve
- Login to EKS
aws eks --region eu-west-1 update-kubeconfig --name eks_cluster
- Deploy Nginx
cd nginx
terraform init
terraform apply --auto-approve
- You need to get address of your load balancer
lb_hostname
:
cd nginx
terraform output
- Open your browser and type:
http://{{ lb_hostname }}