
How to Deploy Apps with ArgoCD
How to Deploy Apps with ArgoCD
ArgoCD is a popular tool for managing continuous deployment within a GitOps environment. It enables you to automate application deployments to Kubernetes clusters, ensuring seamless and reliable delivery of software.
Prerequisites
- Kubernetes cluster (Official site) set up and running.
- Basic understanding of Git and ArgoCD (Official site) concepts.
- Access to a terminal with kubectl installed.
- ArgoCD CLI installed on your local system.
Installing ArgoCD
To deploy applications using ArgoCD, you first need to install it on your Kubernetes cluster. Here’s how:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
The above commands create a new namespace called ‘argocd’ and apply the necessary deployment files.
Accessing the ArgoCD Dashboard
After installation, expose the ArgoCD server as a LoadBalancer service:
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
Retrieve the initial password for the admin user:
kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-server --output name | cut -d'/' -f 2
Logging In and Creating Your First Application
- Navigate to the ArgoCD web UI using the LoadBalancer IP.
- Login with the username
admin
and the initial password retrieved in the previous step. - From the dashboard, click on ‘New App’ to create your first application.
- Provide the repository URL and the path to your Kubernetes manifests or Helm chart.
For more specific details on installing ArgoCD, you can refer to our article on How to Install ArgoCD for GitOps in Kubernetes.
Troubleshooting Common Issues
Issue 1: Unable to Access ArgoCD UI
Ensure your LoadBalancer configuration is correct and that it has been given sufficient time to provision.
Issue 2: Authentication Problems
Recheck the admin password and ensure no errors occurred during the kubectl get
command execution.
Summary Checklist
- Confirm Kubernetes cluster readiness.
- Install ArgoCD and deploy the server.
- Access the ArgoCD dashboard and login successfully.
- Create your first application deployment.
Following these steps, you should be able to deploy your applications using ArgoCD effectively.