2 min to read
Setting up ArgoCD - GitOps Continuous Deployment Tool

Overview
Learn about ArgoCD, a declarative GitOps continuous deployment tool for Kubernetes.
What is ArgoCD?
ArgoCD is a declarative GitOps CD tool for Kubernetes that:
- Ensures application configurations are version controlled
- Automates deployment lifecycle
- Makes application management auditable and understandable
🔍 Why ArgoCD?
- Application definitions, configurations, and environments must be declarative and version controlled.
- Application deployment and lifecycle management should be automated, auditable, and easy to understand.
What is GitOps?
GitOps is a term first used by Weaveworks Inc. in 2017 and is one of DevOps’ practices in projects.
It focuses on continuous deployment targeting cloud-native applications.
As the word indicates, it means that all elements related to the distribution and operation of the application are coded and managed in Git.
ArgoCD Components Architecture
Installation
# Install ArgoCD
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/ha/install.yaml
# Install Argocd Helm Chart https://argo-cd.readthedocs.io/en/latest/user-guide/helm/
# Reference: https://github.com/somaz94/helm-chart-template/tree/main/k8s-service/argocd/argo-cd
helm install argocd argo-cd --namespace argocd --create-namespace --version <version>
# Install ArgoCD CLI
curl -sL -o argocd https://github.com/argoproj/argo-cd/releases/download/v2.7.1/argocd-linux-amd64
chmod +x argocd
sudo mv argocd /usr/local/bin/
Ingress Configuration
# Reference: https://argo-cd.readthedocs.io/en/stable/operator-manual/ingress/
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ilb-argocd
namespace: argocd
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
rules:
- host: argocd.somaz.link
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: argocd-server
port:
name: https
Initial Setup
# Get initial admin password
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
# Verify installation
kubectl get po,svc,ingress,sts -n argocd
Login
Best Practices
1. Security: - Change default admin password
- Use SSL/TLS
- Implement RBAC
2. High Availability: - Use HA installation for production
- Configure proper backup
- Monitor resources
3. GitOps Workflow: - Use declarative configurations
- Version control everything
- Automate deployments
Comments