jzavisek / eks-container-insights-demo

Shows how to configure CloudWatch container insights with EKS cluster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS EKS

Commands

1. Create a cluster

cd ./infra
terraform init
terraform workspace new dev
terraform workspace list
terraform workspace select dev
terraform apply

2. Configure kubectl

export AWS_PROFILE=playground
export KUBECONFIG=/path-to-project/infra/kubeconfig_jz-cwi-demo
aws eks --region eu-central-1 update-kubeconfig --name jz-cwi-demo-eks-dev

3. Build app Docker image (optional)

  • Update ECR registry URL in the Makefile
  • Run:
cd ./app
make docker/image/build
make docker/image/push

4. Deploy nginx ingress controller and app (optional)

cd ./k8s
make apply-nginx
make apply-namespaces
make apply-web

5. Deploy container insights

  • Update eks.amazonaws.com/role-arn in service-account.yaml (run terraform output to get it)
  • Run:
cd ./k8s
make apply-dev-container-insights

Concepts

Diagrams

Terraform modules

Terraform providers

Nginx ingress

About

Shows how to configure CloudWatch container insights with EKS cluster


Languages

Language:HCL 75.0%Language:Makefile 11.3%Language:JavaScript 8.8%Language:Dockerfile 3.0%Language:HTML 1.9%