Difference between revisions of "Deploy EKS cluster using Terraform"
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
Update [[kubeconfig]] with credentials: | Update [[kubeconfig]] with credentials: | ||
[[aws eks]] --region $(terraform output -raw region) [[update-kubeconfig]] --name $(terraform output -raw cluster_name) | [[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]] | Added new context arn:aws:eks:us-east-2:XXXXXXX:cluster/myeks-eks-xxxx to /Users/youruser/[[.kube/config]] | ||
Revision as of 22:48, 30 August 2022
- Terraform
eks
module: https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest- 21 resources:
aws_eks_cluster
(Terraform EKS apply output,terraform show
|grep resource
)
- 21 resources:
Contents
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 plan terraform apply: Terraform EKS apply output It may take around 15 min
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
2.1) Review EKS cluster created
kubectl get nodes The connection to the server localhost:8080 was refused - did you specify the right host or port?
3) Review resources:
terraform show | grep -w resource | sort | uniq
4) Configure kubectl
aws eks list-clusters --output text | awk '{print $2}' aws eks update-kubeconfig --name my-eks-cluster-name
5) Review cluster status/configuration
kubectl cluster-info Default EKS installation
Related
aws eks update-kubeconfig --name my-eks-cluster-name
kubectl cluster-info
kubectl get nodes
kubectl describe nodes
kubeclt get services
Terraform resource: aws eks cluster
AccessDenied ... CreateRole
iam:CreatePolicy
,iam:CreateRole
aws eks create-cluster
asg_desired_capacity
,InstanceType
kubectl proxy
kubeadm
eksctl create cluster
Activities
- Review https://learn.hashicorp.com/tutorials/terraform/eks
- Create your first EKS Cluster using AWS Management Console
See also
kubectl get
: [all
|componentstatus | pods | apiservices | events
|event
|nodes
|replicaset
|services
|svc
|namespaces
|hpa
|secret | deployments | serviceaccounts | endpoints | daemonset | networkpolicy
],kubectl get -h
- EKS,
eksctl
, EKS add-ons, Amazon EKS cluster role, Terraform EKS, Kubernetes Autoscaler, Karpenter, Terraform module: EKS, Terraform resource: aws eks node group, Terraform data source: aws_eks_cluster, AWS Controllers for Kubernetes, AWS Load Balancer Controller, Amazon EKS Anywhere, Kustomize,aws-iam-authenticator
, ACK, tEKS, Amazon EKS authorization, Amazon EKS authentication, Nodegroup, EKS storage,aws-ebs-csi-driver, aws-efs-csi-driver, aws-load-balancer-controller, amazon-vpc-cni-k8s
, EKS security, EKS Best Practices Guides,hardeneks
, EKS versions,fargate-scheduler
,eks-connector
, Resilience in Amazon EKS, EKS control plane logging, Security groups for Pods in EKS - Terraform EKS, Terraform EKS module, Deploy EKS cluster using Terraform, Terraform EKS apply output,
terraform show, ~/.kube/config
,aws_eks_cluster, aws_eks_addon, module.eks_managed_node_group, eks-cluster.tf, node_groups, worker_groups
- Kubernetes installation, Deploy EKS cluster using Terraform, Create your first EKS Cluster using AWS Management Console,
kubeadm init, eksctl create cluster
Advertising: