Unable to add clusters in Argo CD

1k Views Asked by At

I have an eks cluster(Argo cd cluster) and Argo CD running on that and i want to add the another EKS Cluster(staging) which is on another AWS Account, while adding the cluster with argocd cli i'm getting the below error

argocd cluster add

FATA[0034] rpc error: code = DeadlineExceeded desc = Get "https://7676334634763764377B080FC2E502754A3.gr7.eu-central-1.eks.amazonaws.com/version?timeout=32s": dial tcp 52.87.96.207:443: i/o timeout

My staging cluster public access is restricted to office VPN, i have whitelisted the NAT Ip and ingress controller IP also of Argocd cluster still Im getting the error.

PS: When disable the public access cidr access then i'm able to add the cluster successfully.

Not sure what i'm missing here anyone can help me out here.

1

There are 1 best solutions below

0
On BEST ANSWER

To expand on your answer, you would need to:

  • Identifying the Correct NAT IP of the Argo CD cluster, using AWS NAT Gateways:

    # Use AWS CLI to describe the NAT Gateway and find the correct NAT IP
    aws ec2 describe-nat-gateways --query 'NatGateways[?VpcId==`<vpc-id>`].{NatGatewayAddresses: NatGatewayAddresses}'
    
  • Updating the Whitelist on the new EKS cluster to include this IP (security group settings):

    # That would likely be done in the AWS Management Console, under the security group settings for the new EKS cluster
    # Alternatively, it can be done using the AWS CLI or SDKs
    aws ec2 authorize-security-group-ingress --group-id <security-group-id> --protocol tcp --port 443 --cidr <nat-ip>/32
    

https://docs.aws.amazon.com/images/vpc/latest/userguide/images/security-group-overview.png

The correct NAT IP should be whitelisted, allowing the Argo CD instance to communicate with the new EKS cluster and resolving the timeout error.

+--------------------+         +---------------------+          +---------------------+
| Argo CD Cluster    |         |  AWS NAT Gateway    |          | Staging EKS Cluster |
| (eks-cluster-argo) |         |    (Correct NAT IP) |          | (staging-cluster)   |
|                    |         |                     |          |                     |
| ArgoCD Instance    | <-----> | Whitelisted NAT IP  | <------> | Allowed Access      |
|                    |         |                     |          | (Office VPN)        |
+--------------------+         +---------------------+          +---------------------+