This example shows how to deploy Amazon EKS with addons configured via ArgoCD
The example demonstrate how to use private git repository for addons and workload.
The example reads your private ssh key, and creates two secretes to access the git repository for addons and another one for workloads
- Create a Github ssh key file, example assumes the file path
~/.ssh/id_rsa
, updatemain.tf
if using a different location
Before you begin, make sure you have the following command line tools installed:
- git
- terraform
- kubectl
- argocd
- Fork the git repository for addons here.
- Update the following environment variables to point to your fork by changing the default values:
export TF_VAR_gitops_addons_org=git@github.com:gitops-bridge-dev
export TF_VAR_gitops_addons_repo=gitops-bridge-argocd-control-plane-template
Initialize Terraform and deploy the EKS cluster:
terraform init
terraform apply -auto-approve
Retrieve kubectl
config, then execute the output command:
terraform output -raw configure_kubectl
Wait until all the ArgoCD applications' HEALTH STATUS
is Healthy
. Use Crl+C to exit the watch
command
watch kubectl get applications -n argocd
Verify that the addons are ready:
kubectl get deployment -n kube-system \
aws-load-balancer-controller \
metrics-server
Access ArgoCD's UI, run the command from the output:
terraform output -raw access_argocd
To tear down all the resources and the EKS cluster, run the following command:
./destroy.sh