This repository contains an example of deploying and managing a Kubernetes cluster to AWS using Amazon EKS and Terraform, an open-source infrastructure as code software tool.
The provisioned Kubernetes cluster has sample resources that offer an IP-accessible Nginx server.
.
├── k8s # Kubernetes manifests of the example server
└── terraform # Terraform configuration files
- Terraform
- An AWS account with the IAM permissions listed on the EKS module documentation
- A configured AWS CLI
- AWS IAM Authenticator
The requirements must be met for the commands below to work.
# Change current directory to "terraform"
$ cd terraform
# Apply all changes to your AWS account
$ terraform apply
# After Terraform finishes applying the changes, you need to configure your kubectl.
$ aws eks --region $(terraform output -raw region) update-kubeconfig --name $(terraform output -raw cluster_name)
# Use kubectl to list all resources of the created namespace
$ kubectl get all -n brincadeirinha