mirror of
https://github.com/farcasclaudiu/terraform-course.git
synced 2026-06-29 01:02:16 +03:00
eks-demo
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
# Setting up AWS EKS (Hosted Kubernetes)
|
||||
|
||||
See https://www.terraform.io/docs/providers/aws/guides/eks-getting-started.html for full guide
|
||||
|
||||
## Download the aws-iam-authenticator
|
||||
```
|
||||
wget https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.3.0/heptio-authenticator-aws_0.3.0_linux_amd64
|
||||
chmod +x heptio-authenticator-aws_0.3.0_linux_amd64
|
||||
sudo mv heptio-authenticator-aws_0.3.0_linux_amd64 /usr/local/bin/heptio-authenticator-aws
|
||||
```
|
||||
|
||||
## Modify providers.tf
|
||||
|
||||
Choose your region. EKS is not available in every region, use the Region Table to check whether your region is supported: https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/
|
||||
|
||||
Make changes in providers.tf accordingly (region, optionally profile)
|
||||
|
||||
## Terraform apply
|
||||
```
|
||||
terraform apply
|
||||
```
|
||||
|
||||
## Configure kubectl
|
||||
```
|
||||
terraform output kubeconfig # save output in ~/.kube/config
|
||||
```
|
||||
|
||||
## Configure config-map-auth-aws
|
||||
```
|
||||
terraform output config-map-aws-auth # save output in config-map-aws-auth.yaml
|
||||
kubectl apply -f config-map-aws-auth.yaml
|
||||
```
|
||||
|
||||
## See nodes coming up
|
||||
```
|
||||
kubectl get nodes
|
||||
```
|
||||
Reference in New Issue
Block a user