Can't add a cluster, the server has asked for the client to provide credentials
- Dominant language
- Go
- Stars
- 24.2k
- Forks
- 7.8k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 239
Description
**Describe the bug**
I can't add another k8s cluster, it looks like I'm missing some credentials.
What kind of credentials ?
Certs needs to be created, https://github.com/argoproj/argo-cd/issues/3655 ?
**To Reproduce**
```
argocd cluster add my-cluster.com # I can see it when listing then
INFO[0000] ServiceAccount "argocd-manager" already exists in namespace "kube-system"
INFO[0000] ClusterRole "argocd-manager-role" updated
INFO[0001] ClusterRoleBinding "argocd-manager-role-binding" updated
FATA[0002] rpc error: code = Unknown desc = REST config invalid: the server has asked for the client to provide credentials
```
In order to argocd login I need the flag `--grpc-web`
Documentation:
https://argoproj.github.io/argo-cd/getting_started/#5-register-a-cluster-to-deploy-apps-to-optional
**Version**
```shell
argocd version
argocd: v1.6.0+c10ae24
BuildDate: 2020-06-16T22:41:56Z
GitCommit: c10ae246ab02f1356147118a1979fedcd1ceb704
GitTreeState: clean
GoVersion: go1.14.1
Compiler: gc
Platform: darwin/amd64
argocd-server: v1.6.1+159674e
BuildDate: 2020-06-19T00:41:05Z
GitCommit: 159674ee844a378fb98fe297006bf7b83a6e32d2
GitTreeState: clean
GoVersion: go1.14.1
Compiler: gc
Platform: linux/amd64
Ksonnet Version: v0.13.1
Kustomize Version: {Version:kustomize/v3.6.1 GitCommit:c97fa946d576eb6ed559f17f2ac43b3b5a8d5dbd BuildDate:2020-05-27T20:47:35Z GoOs:linux GoArch:amd64}
Helm Version: version.BuildInfo{Version:"v3.2.0", GitCommit:"e11b7ce3b12db2941e90399e874513fbd24bcb71", GitTreeState:"clean", GoVersion:"go1.13.10"}
Kubectl Version: v1.14.0
```
Contributor guide
Research direction
Reproduce the failure with `argocd cluster add my-cluster.com` and compare it with the successful `argocd login --grpc-web` setup. Read the cluster-registration documentation and the referenced issue 3655 first. Done means a cluster can be added without the REST config credentials error, with the required credential behavior documented or covered by a test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- authentication, cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100