Difference between revisions of "Deploy EKS cluster using Terraform"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Tags: Mobile web edit, Mobile edit
Line 31: Line 31:
 
* <code>[[Terraform resource: aws eks cluster]]</code>
 
* <code>[[Terraform resource: aws eks cluster]]</code>
 
* <code>[[AccessDenied]] ... [[CreateRole]]</code>
 
* <code>[[AccessDenied]] ... [[CreateRole]]</code>
* <code>[[iam:CreatePolicy]]</code>
+
* <code>[[iam:CreatePolicy]]</code>, <code>[[iam:CreateRole]]</code>
* <code>[[iam:CreateRole]]</code>
 
 
* <code>[[aws eks create-cluster]]</code>
 
* <code>[[aws eks create-cluster]]</code>
 
* <code>[[asg_desired_capacity]]</code>, <code>[[InstanceType]]</code>
 
* <code>[[asg_desired_capacity]]</code>, <code>[[InstanceType]]</code>

Revision as of 18:35, 10 June 2022

Example

0) Download code

git clone https://github.com/hashicorp/learn-terraform-provision-eks-cluster
cd learn-terraform-provision-eks-cluster

1) Execute

terraform init #It may take several minutes
terraform apply
(Terraform EKS apply output)

1.1) Review execution

kubectl get nodes
The connection to the server localhost:8080 was refused - did you specify the right host or port?

2) Update configuration

Update kubeconfig with credentials:
aws eks --region $(terraform output -raw region) update-kubeconfig --name $(terraform output -raw cluster_name)
Added new context arn:aws:eks:us-east-2:XXXXXXX:cluster/myeks-eks-xxxx to /Users/youruser/.kube/config

3) Review resources:

terraform show (grep resource) in EKS

Related

Activities

See also

Advertising: