0% found this document useful (0 votes)
14 views7 pages

Eks With Terraform

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views7 pages

Eks With Terraform

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

How to Create an Amazon Elastic Kubernetes

Service Cluster using Terraform

Amazon Elastic Kubernetes Service (Amazon EKS) is a fully managed


Kubernetes service provided by Amazon Web Services (AWS). Amazon
EKS is a Kubernetes Cluster platform that automates the deployment
and management of Kubernetes applications on the AWS cloud. It
automatically runs and scales the Kubernetes application containers
across the multiple AWS cloud zones.

Terraform is an open-source infrastructure-as-code (IaC) tool written in


Go and developed by HashiCorp. Terraform is used to automate the
creation and provisioning of infrastructure on the cloud. We will use
Terraform to provision resources and infrastructure on the AWS cloud.

We will write Terraform files using the HashiCorp Configuration


Language to configure all the AWS resources for the Amazon EKS
Cluster. Terraform will use these files to create and provision the
Amazon EKS cluster infrastructure.

Pre Requisite:-

1) Terraform Install on system


2) AWS Account with IAM credentials
3) AWS CLI install on system where Terrafrom Is running.

Write Terraform Files in some Directory


Write Files

eks-cluster.tf

variables.tf

outputs.tf
security-groups.tf

versions.tf
vpc.tf

Before Executing These Files Configure AWS first


Then Run terraform Commands

1) Terraform init command

This command will initialize the Terraform AWS EKS modules and the
Terraform backend. It will download the modules from the Terraform registry.
It will also download and install the AWS EKS provider plugins from the
`hashicorp/aws`:

terraform init
2)Terraform plan command

This command will show all the AWS resources defined in the Terraform files.

These are the AWS resources that Terraform will provision in the AWS EKS

cluster:

terraform plan
Terraform apply command
This command will provision the AWS EKS Cluster and all the AWS resources

defined in the Terraform files:

terraform apply

You might also like