Guarding the Gateway: A Comprehensive Guide to Securing ArgoCD Admin Passwords
Introduction:-
ArgoCD, with its powerful features for continuous delivery, is a linchpin in modern DevOps pipelines. However, the importance of securing its admin passwords cannot be overstated. In this step-by-step guide, we’ll unravel the intricacies of fortifying your ArgoCD setup by mastering the art of resetting admin passwords. Let’s embark on this journey to reinforce the gateway of your deployment process.
Step 1: To initiate the password reset, we start by invalidating the current admin credentials. Run the following kubectl
command to patch the ArgoCD secret:
kubectl patch secret argocd-secret -n argocd -p '{"data": {"admin.password": null, "admin.passwordMtime": null}}'
This step renders the existing admin password useless, ensuring a clean slate for the upcoming password reset.
Step 2: Next, to apply the changes made in Step 1, we need to restart the ArgoCD server pods. Execute the following command to gracefully restart the pods:
kubectl delete pods -n argocd -l app.kubernetes.io/name=argocd-server
This ensures that the changes take effect and the ArgoCD server picks up the updated secret.
Step 3:- Now that the admin credentials are reset, let’s generate a new password and decrypt it for secure access.
Run the following command to retrieve and decrypt the new password from the argocd-initial-admin-secret
:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
This command fetches the base64-encoded password, decodes it, and displays the new admin password.
Conclusion :-
Securing your ArgoCD admin passwords is not just a task; it’s a commitment to the integrity and reliability of your DevOps workflows. By following this step-by-step guide, you’ve not only learned the art of resetting passwords but also gained insights into maintaining a robust security posture. As you fortify your ArgoCD deployment, rest assured that you’re taking a giant leap toward a more secure and resilient continuous delivery pipeline.
Subscribe to my newsletter
Read articles from Mahira Technology Private Limited directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Mahira Technology Private Limited
Mahira Technology Private Limited
A leading tech consulting firm specializing in innovative solutions. Experts in cloud, DevOps, automation, data analytics & more. Trusted technology partner.