Click on your username in the top-right corner of the UI.
Select “Account Settings” or a similar option (the wording may vary slightly).
Generate a Token:
Look for an option to “Generate Token” or “Add Token”.
Provide a name or description for the token if required (this is just for reference).
Click “Generate”.
Copy the Token:
After generating the token, a dialog box will display it.
Copy the token immediately, as you might not be able to see it again.
You should usually generate the key from admin account. In case you aren’t seeing this feature in admin, that means your account does not have the permission to generate an apikey. To enable this, you’ll have to edit the ArgoCD configuration to add the apiKey capability for your account.
Edit the ArgoCD ConfigMap: Use the following command to edit the argocd-cm ConfigMap:
Copy
Ask AI
kubectl edit configmap argocd-cm -n argocd
Update the admin Capabilities: In the ConfigMap, add or update the admin account capabilities under the accounts section:
Copy
Ask AI
data: accounts.admin: apiKey
Save the Changes: After editing, save and exit. This will update the configuration.
Restart the ArgoCD Server: Restart the ArgoCD server to apply the changes.