* working first run * removing core module dependencies * adding CW datasource * alarms MVP * readmes * Adding Screenshot * Adding billing note * adding billing module * Revert "adding billing module" This reverts commit 40d667e37db1036cd71a471ef2fde83ec02aaa13. reverting * adding billing module * Updating Screenshot * resolving feedback * removing unused modules * fmt * Support for tf 1.3.x * removing unused variables * support alarms for multiple workspaces * Updating Readme * docs first draft * indigo nav fix * Simplify docs * RUM White Logo * amp docs * removing billing docs * Change docs structure, reword infrastructure monitoring doc * Pre-commit fixes * drop dead code * Add concepts page * Update contributors * Update java * Update docs * Docs for workloads * Update docs site * typos * pre-commit fixes * Update pre-commit * Update pre-commit Co-authored-by: Rodrigue Koffi <bonclay7@users.noreply.github.com>
2.1 KiB
Creating a new Amazon EKS cluster with VPC
Note: This example is a subset from this EKS Blueprint example
This example deploys the following:
- New sample VPC, 3 Private Subnets and 3 Public Subnets
- Internet gateway for Public Subnets and NAT Gateway for Private Subnets
- EKS Cluster Control plane with one managed node group
Prerequisites
Make sure to complete the prerequisites section before proceeding.
Setup
1. Download sources and initialize Terraform
git clone https://github.com/aws-observability/terraform-aws-observability-accelerator.git
cd examples/eks-cluster-with-vpc/
terraform init
2. AWS Region
Specify the AWS Region where the resources will be deployed:
export TF_VAR_aws_region=xxx
Deploy
Simply run this command to deploy the example
terraform apply
Login to your cluster
EKS Cluster details can be extracted from terraform output or from AWS Console to get the name of cluster. Use the following commands in your local machine where you want to interact with your EKS Cluster.
1. Run update-kubeconfig command
~/.kube/config file gets updated with cluster details and certificate from the below command
aws eks --region <enter-your-region> update-kubeconfig --name <cluster-name>
2. List all the worker nodes by running the command below
kubectl get nodes
3. List all the pods running in kube-system namespace
kubectl get pods -n kube-system
Cleanup
To clean up your environment, destroy the Terraform modules in reverse order.
Destroy the Kubernetes Add-ons, EKS cluster with Node groups and VPC
terraform destroy -target="module.eks_blueprints_kubernetes_addons" -auto-approve
terraform destroy -target="module.eks_blueprints" -auto-approve
terraform destroy -target="module.vpc" -auto-approve
Finally, destroy any additional resources that are not in the above modules
terraform destroy -auto-approve