Repository navigation
Description
If you are trying to resolve an environment-specific issue or have a one-off question about the edge case that does not require a feature then please consider asking a question in argocd slack channel.
Checklist:
- I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
- I've included steps to reproduce the bug.
- I've pasted the output of
argocd version.
Describe the bug
I have 2 K3s in my Mac, one has the Argocd. Now, when I connect to another K3s cluster using argocd cluster add <context-name> I get the below error
INFO[0000] ServiceAccount "argocd-manager" already exists in namespace "kube-system"
INFO[0000] ClusterRole "argocd-manager-role" updated
INFO[0000] ClusterRoleBinding "argocd-manager-role-binding" updated
FATA[0001] Failed to establish connection to localhost:8080: dial tcp [::1]:8080: connect: connection refused
To Reproduce
- create 2 k3s clusters (using k3sup or k3d)
- Install argocd in one of the cluster following the step described in the argocd doc
- run
argocd cluster add <2nd-cluster-context-name>
Expected behavior
It should add the 2nd cluster?
Version
argocd: v2.0.1+33eaf11.dirty
BuildDate: 2021-04-21T18:44:13Z
GitCommit: 33eaf11
GitTreeState: dirty
GoVersion: go1.16.3
Compiler: gc
Platform: darwin/amd64
argocd-server: v2.0.0+f5119c0
BuildDate: 2021-04-07T06:00:33Z
GitCommit: f5119c0
GitTreeState: clean
GoVersion: go1.16
Compiler: gc
Platform: linux/amd64
Ksonnet Version: v0.13.1
Kustomize Version: v3.9.4 2021-02-09T19:22:10Z
Helm Version: v3.5.1+g32c2223
Kubectl Version: v0.20.4
Jsonnet Version: v0.17.0
INFO[0000] ServiceAccount "argocd-manager" already exists in namespace "kube-system"
INFO[0000] ClusterRole "argocd-manager-role" updated
INFO[0000] ClusterRoleBinding "argocd-manager-role-binding" updated
FATA[0001] Failed to establish connection to localhost:8080: dial tcp [::1]:8080: connect: connection refused
Activity
jannfis commentedon May 1, 2021
You need to setup the context in your
~/.kube/configso that it points to an URL of the K8s control plane's API reachable by the cluster Argo CD is running in. Yours is setup to connect to localhost, as indicated byYou may also have to reconfigure your k3s to make this work. This is not an Argo CD bug.