Skip to content

GorginZ/eks-play

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EKS PLAY

Status: WIP - bastion still can't reach private endpoint

Deploy a basic EKS cluster.

  • deploy VPC that meets the EKS networkign requirements with aws cloudformation
  • deploy EKS cluster with terraform

Required:

Usage

00-vpc has resouces to deploy the VPC that meets eks network requirements

eks has terraform config to spin up eks cluster.

Set up

Most dependencies are managed in the compose.yaml and respective Dockerfile, this has a couple of services so that you don't have to install terraform or aws-cli.

We'll use the scripts/do-action.sh <action> to roll out deployment, which calls the compose service as needed.

configure programmatic access for aws-cli:

Verify aws cli picks up creds okay with the compose:

docker compose run aws iam list-users

If it works it works


Deploy VPC and other EKS networking resources

./scripts/do-action.sh deploy-eks-vpc

This deploys a basic subnet that meets the networking requirements for an EKS cluster.

Configure your tfvars

This will get the outputs from the VPC cloudformation stack. Fill in the rest yourself:

./scripts/do-action.sh seed-tfvars-file 

Deploy the EKS cluster and bastion

We'll just use a local tf backend for now. Do a plan first if you'd like:

docker compose run terraform -chdir=eks plan -var-file eks-play.tfvars

Deploy:

./scripts/do-action.sh deploy-eks-cluster

yes when prompted


Now you can connect to the bastion instance with Session Manager and reach the cluster once you authenticate.

Run:

aws configure

don't forget to clean up

docker compose run terraform -chdir=eks destroy -var-file eks-play.tfvars

say yes when prompted.

Then the VPC:

aws cloudformation delete-stack --stack-name=eks-vpc;

double check in console

About

Trying out aws EKS managed k8s service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published