Go to file
2023-04-04 17:07:12 +02:00
infra Upgrade eks add-ons 2023-04-04 17:07:12 +02:00
init-state Terraform providers upgrades. 2023-04-04 17:01:16 +02:00
modules Terraform providers upgrades. 2023-04-04 17:01:16 +02:00
.gitignore Terraform providers upgrades. 2023-04-04 17:01:16 +02:00
backend.tf Initial commit. 2022-07-01 14:12:11 +02:00
Makefile Terraform providers upgrades. 2023-04-04 17:01:16 +02:00
README.md Terraform providers upgrades. 2023-04-04 17:01:16 +02:00
terragrunt.hcl Initial commit. 2022-07-01 14:12:11 +02:00

avx-pmarie-aws-infra

Initialization

Run terraform into the init-state directory to create initial s3 & dynamodb.

Make sure to use the correct region:

$ set -x AWS_DEFAULT_REGION eu-west-3

Initial deployment

Because of the uncreated dependencies, it is required to do extra step on a full deployment. It is required to create first the VPC, then the EKS cluster, then ebs-addon-csi-driver, then kube-prometheus-stack and finally the last other components:

$ cd infra/vpc && terragrunt plan && terragrunt apply
...
$ cd ../../ && make apply

Validate, plan & apply

There is a Makefile for this:

$ make validate
$ make plan
$ make apply

Extract EKS configuration

$ aws eks update-kubeconfig --name avx-pmarie-eks --region eu-west-3
$ kubectl config rename-context arn:aws:eks:eu-west-3:563042046245:cluster/avx-pmarie-eks avx-pmarie-eks

Notes

aws-auth

It can be required to import existing aws-auth configmap:

$ cd infra/eks-aws-auth
$ terragrunt import kubernetes_config_map.aws_auth kube-system/aws-auth
...

ebs-csi-driver

The driver is installed and managed as cluster addons in eks. It is required to annotate the service account & to restart the controller so the created role in eks-addon-csi-ebs is updated.