ArgoCD+Terraform=EKS
CI/CD - Continues Deployment using ArgoCD, Terraform to AWS EKS cluster

Prerequisites
Before deploying ArgoCD, you must have the following:
An AWS account with permissions to create EKS clusters and associated resources
kubectlandawsCLI tools installed and configuredA domain name and SSL certificate for the ArgoCD server (optional)
eksctl installed NOTE! eksctl created a kubectl config file in ~/.kube or added the new cluster's configuration within an existing config file in ~/.kube.
Create a EKS using file "eks_cluster_dev.yaml"
eksctl create cluster -f eks_cluster_dev.yamlRepeat tasks for PROD claster when ready:
eksctl create cluster -f eks_cluster_prod.yamlDeployment Steps
Go to the "cluster_conf" folder and run eksctl commands to create EKS clusters:
Create EKS clusters in the desired environment (dev, stage, or prod)
cd cluster_conf
eksctl create cluster -f eks_cluster_dev.yamlit takes 5-10 mins to get it ready.
Configure
kubectlto use the new cluster. To switch to another cluster use the corresponding cluster name
aws eks update-kubeconfig --name devDeploy the ArgoCD server and API components
cd terraform
terraform init
terraform plan
terraform applyOnce deployed go to get Password for ArgoCD (repeat it for DEV, STAGE and PROD env)
kubectl get secret -n argocd argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -dIn output: v7zsMfACEB6TBllN #example KfeEDzCCv4-BBLLq
Configure the ArgoCD server with the desired settings (SSH keys generating)
cd terraform
mkdir keys
cd keys && ssh-keygen
<output: > Generating public/private rsa key pair.
Enter file in which to save the key (/Users/serg/.ssh/id_rsa): argocd
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in argocd
Your public key has been saved in argocd.pub
......Then copy PUBLIC KEY to GitHub repo in Settings / Deploy keys
cd keys && cat argocd.pubAnd PRIVATE KEY to ArgoCD Settings/Repository/Connect (for ALL environments will be set up the SAME Private Key)
(Optional) Set up a domain name and SSL certificate for the ArgoCD server
Last updated
