Argo-cd: Cannot login with initial admin password

Created on 21 Oct 2020  路  13Comments  路  Source: argoproj/argo-cd

Checklist:

  • [x ] I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • [ x] I've included steps to reproduce the bug.
  • [ x] I've pasted the output of argocd version.

Describe the bug

I just cannot login to the argocd server. I followed the steps in the getting started guide, did not change anything, patched the argocd-server service to be LoadBalancer, but I cannot login with admin and the argocd-server pod name, wether from CLI or GUI. When I try kubectl get secret argocd-cluster -n argocd -o yaml | yq r - "data.admin*" | base64 --decode, I get this answer: Error from server (NotFound): secrets "argocd-cluster" not found. I do not have any secret management tool installed, like Vault.

To Reproduce
Follow the steps from here: https://argoproj.github.io/argo-cd/getting_started/

Expected behavior
Be able to login with admin and the argocd-server pod name.

Version

argocd: v1.7.8+ef5010c.dirty
  BuildDate: 2020-10-16T04:56:45Z
  GitCommit: ef5010c3a0b5e027fd642732d03c5b0391b1e574
  GitTreeState: dirty
  GoVersion: go1.15.2
  Compiler: gc
  Platform: darwin/amd64
bug

Most helpful comment

Ok I am so stupid. Indeed resetting the password worked, thank you very much and sorry for your time loss !

All 13 comments

Hi, the secret is called argocd-secret, not argocd-cluster. But inspecting the secret won't give you the password anyway, since it is encrypted.

What does the command from step 4 print? After making sure the server pod is running:

kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-server -o name | cut -d'/' -f 2

you can reset the password like so:

// patch secret
kubectl patch secret argocd-secret  -p '{"data": {"admin.password": null, "admin.passwordMtime": null}}'

// delete argocd server pod
kubectl delete po $(kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-server -o name | cut -d'/' -f 2)

Use the new argocd-server pod's name as the password

@tetchel , it prints me the argocd-server pod name, argocd-server-67885bdcff-pdhr8. When I try to use it as the admin password it does not work.

@darshanime , the first command returns Error from server (NotFound): secrets "argocd-secret" not found. I really do not know how this can be happening, I just applied the manifest from getting started and nothing else.

darshan's commands don't specify a namespace - add -n argocd. Or change your currnet context's namespace to argocd:

kubectl config set-context $(kubectl config current-context) --namespace="argocd"

Ok I am so stupid. Indeed resetting the password worked, thank you very much and sorry for your time loss !

can you close the issue if you are satisfied?

@tetchel Can we reopen this? I am having the same issue. The initial password is not the server pod name.

what does kubectl get pods print? make sure your current context targets the argocd namespace.

@tetchel asked

what does kubectl get pods print? make sure your current context targets the argocd namespace.

$ kubectl get pods
NAME                                                  READY   STATUS    RESTARTS   AGE
argo-argocd-application-controller-6b779cbd75-zvqbm   1/1     Running   0          127m
argo-argocd-dex-server-fb9667fd9-pdvjr                1/1     Running   0          127m
argo-argocd-redis-7bd948c87d-rtr5w                    1/1     Running   0          127m
argo-argocd-repo-server-55bfd65978-22dqp              1/1     Running   0          127m
argo-argocd-server-7db5dfc6c8-xq8ps                   1/1     Running   0          125m

So I would expect the password to be argo-argocd-server-7db5dfc6c8-xq8ps but it is not.

i am not sure why your pod names are prefixed with "argo". Usually they are just eg. argocd-server, not argo-argocd-server. can you confirm how you installed?

the password may just be argocd-server-7db5dfc6c8-xq8ps

i am not sure why your pod names are prefixed with "argo". Usually they are just eg. argocd-server, not argo-argocd-server. can you confirm how you installed?

the password may just be argocd-server-7db5dfc6c8-xq8ps

I installed it using the helm chart. The password is NOT argocd-server-7db5dfc6c8-xq8ps either.

OK, please open a new issue because i'm not sure what's wrong.

Also, it's more of a workaround, but please see darshan's comment above re: resetting the password.

Was this page helpful?
0 / 5 - 0 ratings