The process of deploying a project to AWS EKS is best followed in the following order:
How to organize AWS EKS
Install Argo CD to deploy services on AWS EKS
How to set the AWS secret manager with AWS EKS
Connecting GitHub and ArgoCD and manage service
Managing environment variables in AWS EKS.
If you have gone through the process of connecting GitHub and ArgoCD to manage services, you can verify that the “api” project has been deployed to actual pods.
Most projects manage environment variables in the following way:
Local
Add a .env
file and populate it with the values of the environment variables. However, since this information should not be publicly exposed, it is typically added to the .gitignore
file to exclude it from being committed to GitHub.
Cloud
environment variables are stored in a secret space, and the project references and uses that information.
Let’s explore how to achieve this in AWS EKS.
First, refer to “How to set the AWS Secret Manager with AWS EKS” to configure AWS Secret Manager for use with AWS EKS.
Once the setup is complete, you can add the following YAML for environment variables: