...
| Code Block |
|---|
|
kubectl apply -f argocd-ingress.yaml
|
Create a Permanent Token for Login
🔹 1. Create a ServiceAccount
Retrieve initial password
| Code Block |
|---|
|
kubectl -n argocd createget serviceaccountsecret argocd-admin-sa
|
Bind It to Argo CD Admin Role
| Code Block |
|---|
|
kubectl -n argocd create rolebinding argocdinitial-admin-rbsecret --role=admin --serviceaccount=argocd:argocd-admin-sa
|
Create a Secret-based Token
Create this file: argocd-token.yaml
| Code Block |
|---|
| language | yaml |
|---|
| title | manifest |
|---|
|
apiVersion: v1
kind: Secret
metadata:
name: argocd-admin-token
namespace: argocd
annotations:
kubernetes.io/service-account.name: argocd-admin-sa
type: kubernetes.io/service-account-token |
Apply it:
| Code Block |
|---|
|
kubectl apply -f argocd-token.yaml
|
Wait & Retrieve the Token
It may take a few seconds for Kubernetes to populate the token. Then:
| Code Block |
|---|
| language | shell |
|---|
| title | Shell Command |
|---|
|
kubectl -n argocd describe secret argocd-admin-token |
Check the address exposed and add in the /etc/hosts as argocd.da
Shell Command
o jsonpath="{.data.password}" | base64 -d |
connect to UI (admin and password)
see the address
| Code Block |
|---|
| language | shell |
|---|
| title | Shell Command |
|---|
|
kubectl get ingress -n argocd |
🧠 You must configure a DNS entry or /etc/hosts pointing argocd.da
...
(or whatever) with your ingress controller IP.
Change the password! the inital password wont work for long
...