ArgoCD π is a powerful, declarative GitOps π continuous delivery tool designed for Kubernetes βΈοΈ, enabling seamless automatic deployment β‘ and lifecycle management of applications. It ensures that the desired application state, defined in a Git repository π, is automatically synchronized with the actual state in a Kubernetes cluster ποΈ. This makes deployments more reliable, automated, and version-controlled β . With ArgoCD, teams can achieve real-time monitoring π, rollback capabilities π, and multi-cluster management π, enhancing both security π and efficiency in DevOps workflows.
In this beginner-friendly guide π, we will walk through the installation and configuration of ArgoCD on Minikube π», a lightweight Kubernetes environment ideal for testing and development. We will then demonstrate how to deploy an application π, monitor its deployment status β , and expose it for external access π. By the end of this guide, you will have a fully functional ArgoCD setup π―, understand its key features, and be equipped to manage Kubernetes applications declaratively using GitOps principles π₯.
This guide is beginner-friendly and covers essential steps in detail. π―
Ensure you have the following installed:
- Minikube (Install Guide)
- kubectl (Install Guide)
To verify Minikube installation:
minikube versionStart your Minikube cluster:
minikube startCheck the status:
minikube statusCreate a namespace for ArgoCD:
kubectl create namespace argocdCreate a namespace for applications:
kubectl create namespace argocd-appsApply the ArgoCD installation manifest:
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yamlVerify installation:
kubectl get pods -n argocd -wCheck services:
kubectl get svc -n argocdBy default, the ArgoCD server runs as a ClusterIP service. Change it to NodePort:
kubectl edit svc argocd-server -n argocdLocate type: ClusterIP and change it to type: NodePort. Save and exit.
Expose the ArgoCD server:
minikube service argocd-server -n argocdYou will receive a URL similar to:
http://127.0.0.1:6516
Use this URL to access the ArgoCD dashboard. π―
Find the secret containing the initial admin password:
kubectl get secrets -n argocdEdit the secret file:
kubectl edit secret argocd-initial-admin-secret -n argocdDecode the base64 password using or any other third party services:
echo <base64-password> | base64 --decodeUse admin as the username and the decoded password to log in.
1οΈβ£ Login to ArgoCD CLI:
argocd login <your-minikube-ip>:<argo-port>2οΈβ£ Create an Application in ArgoCD:
argocd app create "hello-argocd" \
--repo https://github.com/argoproj/argocd-example-apps.git \
--path guestbook \
--dest-server https://kubernetes.default.svc \
--dest-namespace argocd-apps3οΈβ£ Sync the Application:
argocd app sync "hello-argocd"4οΈβ£ Verify Application Status:
kubectl get pods -n argocd-apps1οΈβ£ Access ArgoCD Web UI:
Open the ArgoCD dashboard in your browser using the URL from Step 4:
http://127.0.0.1:6516
2οΈβ£ Login:
Use admin as the username and the password obtained in Step 5.
3οΈβ£ Create an Application:
-
In the ArgoCD dashboard, click on + NEW APP.
-
In the Application Name field, enter
hello-argocd
-
Set the Project to
default
-
Under Repository URL, enter
https://github.com/argoproj/argocd-example-apps.git
-
Set Path to
guestbook
-
Set Destination Cluster to
https://kubernetes.default.svc
-
Set Namespace to
argocd-apps
Click Create to add the application.
4οΈβ£ Sync the Application:
Once the application is created, click the Sync button on the application details page to sync the app.
5οΈβ£ Verify Application Status:
You will see the status of your application under Application Details. Wait until the status shows as Synced and Healthy.
Find the service:
kubectl get svc -n argocd-appsEdit the service to get the NodePort:
kubectl edit svc guestbook-ui -n argocd-appsExpose the application:
kubectl expose service guestbook-ui --type=NodePort --target-port=80 --name=guestbook-ui-ext -n argocd-appsAccess the application:
minikube service guestbook-ui-ext -n argocd-appsπ Your application is now deployed via ArgoCD!
Congratulations! You have successfully set up ArgoCD on Minikube, deployed an application, and exposed it.
β Key Takeaways:
- ArgoCD is a GitOps continuous delivery tool for Kubernetes.
- Applications are managed declaratively from a Git repository.
- Minikube helps simulate a real Kubernetes cluster for testing.
π Next Steps:
- Explore Argo Rollouts for advanced deployment strategies.
- Set up RBAC and authentication for ArgoCD security.
- Deploy a real-world application using ArgoCD.
π Useful Links:
