Alternative way to include AWS EKS cluster #22000
Replies: 4 comments 1 reply
-
| I was linked here after running into a similar issue with the  | 
Beta Was this translation helpful? Give feedback.
-
| @tmisch I think I'm pretty close to your solution but still running into the Auth timeout issue. I was wondering if you are on the CNCF Slack channel? If you're open to a few moments of time to walk through my test and see if I'm missing a step from yours? Thank you. | 
Beta Was this translation helpful? Give feedback.
-
| You can join using this link but I just found it on Google. I was actually able to verify that your approach works! We've connected two clusters in two separate AWS accounts and tested it changes which profile it uses based on the credentials file. I am for updating the ArgoCD documentation to reflect this. I believe your example here is the correct way to use this. | 
Beta Was this translation helpful? Give feedback.
-
| +1 thank you so much for this! The ArgoCD documentation is flawed, especially with the incorrect Helm example and missing env variables. Legend! | 
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We are hosting an Argo CD installation on a Kubernetes cluster (non AWS EKS) inside our company internal network. The cluster has access to the internet and we want to add an AWS EKS based cluster to Argo CD, to let Argo CD manage some infrastructural applications on the AWS EKS cluster that are required to deploy and run our own application e.g. for demonstration purposes outside the company.
The version of Argo CD currently running on our systems is
v2.12.6.I tried to add an EKS cluster to Argo CD using declarative setup as described in the official documentation Using An AWS Profile For Authentication.
The
aws-authconfig map is available in the EKS cluster and the corresponding IAM user already allows us to access the cluster and successfully deploy applications to it from within our deployment pipelines.I have added the
volumeandvolumeMountwith the profiles file (resp. credentials file) from a secret to the deployment of thecontrollerand theservercomponent, and verified the mounted file in the two pods.But i left out the
aws_session_tokenfrom the credentials file, since session tokens provide temporary access (at least according to AWS_SESSION_TOKEN in AWS documentation ) and i think that permanent access is required for Argo CD. I do not want to update my secret credentials file in Kubernetes every hour or day!? In other use cases, it is sufficient to specifyaws_access_key_idandaws_secret_access_keyin the credentials file.Unfortunately, using this configuration the cluster cannot be successfully integrated in Argo CD. Instead the following error is shown:
error synchronizing cache state : Get "https://<...>.eks.amazonaws.com/version?timeout=32s": getting credentials: exec: executable argocd-k8s-auth failed with exit code 20 (Client.Timeout exceeded while awaiting headers)I was wondering about the value of the
profileconfiguration variable in the cluster secret mentioned in the docs, that points to the credentials file. As far as i know from the AWS documentation, the environment variable AWS_PROFILE specifies the name of a profile inside the credentials file, not the credentials file itself. By checking the sources of Argo CD andargocd-k8s-authi came to the conclusion, that the meaning of theprofileconfig setting could be identical to this environment variable. Due to that i changed configuration of the Argo CD helm chart and the cluster secret and was able to successfully integrate the cluster and deploy a test application to it using Argo CD.These are the changes to my configuration:
In the cluster secret, place the name of a profile that is listed in the credentials file instead of the path to the credentials file:
Define AWS standard environment variable
AWS_SHARED_CREDENTIALS_FILEusing helm values forargocd-serverandargocd-application-controllerin addition to thevolumeandvolumeMountspecification already mentioned in Argo CD documentation:To my opinion, this setup is now very close to official AWS documentation.
Should the Argo CD documentation get updated to show this way of configuration in section Using An AWS Profile For Authentication?
BTW:
I needed to use yaml keys
volumeandvolumeMountsinstead of keysextraVolumesandextraVolumeMountsstated in the documentation. This could also be updated.Beta Was this translation helpful? Give feedback.
All reactions