Argo CD is largely stateless. All data is persisted as Kubernetes objects in etcd. Redis is only used as a disposable cache and can be safely rebuilt without service disruption.
Prerequisites
- Kubernetes cluster (version 1.27+)
- Minimum 3 worker nodes (required for pod anti-affinity rules)
- kubectl CLI configured with cluster-admin access
- IPv4 networking (IPv6-only clusters are not supported)
Installation
1
Create the namespace
Create a dedicated namespace for Argo CD:
2
Apply the HA manifest
Install Argo CD using the HA manifest:For a specific version:
3
Verify the deployment
Check that all pods are running with multiple replicas:Expected output (with multiple replicas):
HA Architecture
- Component Replicas
- Redis HA
- Anti-Affinity
API Server (argocd-server)
- Type: Deployment
- Replicas: 2+ (configurable)
- Purpose: Stateless API and UI servers
- Scaling: Can be scaled horizontally for load distribution
Repository Server (argocd-repo-server)
- Type: Deployment
- Replicas: 2+ (configurable)
- Purpose: Handles manifest generation
- Scaling: Scale based on repository count and manifest generation load
Application Controller (argocd-application-controller)
- Type: StatefulSet
- Replicas: 1 (can be sharded for large deployments)
- Purpose: Reconciles application state
- Sharding: Enable for managing 1000+ applications or multiple clusters
HA vs Standard Installation
Scaling Strategies
Scaling the API Server
Scaling the API Server
Increase replicas for handling more concurrent users:Update the
ARGOCD_API_SERVER_REPLICAS environment variable:The
ARGOCD_API_SERVER_REPLICAS variable is used to divide the limit of concurrent login requests between replicas.Scaling the Repository Server
Scaling the Repository Server
Increase replicas for handling more manifest generation:Tuning Parameters:
--parallelismlimit: Control concurrent manifest generations (default: 20)--repo-cache-expiration: Cache duration (default: 24h)ARGOCD_EXEC_TIMEOUT: Command execution timeout (default: 90s)
Namespace-Level HA Installation
For HA installation without cluster-admin privileges:Performance Tuning
Monitoring and Observability
Metrics Endpoints
All components expose Prometheus metrics:- argocd-server:
:8083/metrics - argocd-repo-server:
:8084/metrics - argocd-application-controller:
:8082/metrics
Key Metrics
Enable Profiling (Optional)
Upgrading
To upgrade the HA installation:Disaster Recovery
Backup Strategy
Since Argo CD stores all state in Kubernetes objects:Restore Strategy
Redis is only a cache. Even if Redis data is lost, Argo CD will rebuild the cache automatically.
Troubleshooting
Pods stuck in Pending (Anti-affinity issues)
Pods stuck in Pending (Anti-affinity issues)
If you have fewer than 3 nodes, you’ll need to adjust anti-affinity rules:Or create a kustomization that removes anti-affinity rules.
Redis HA connection issues
Redis HA connection issues
Check Redis Sentinel status:Check HAProxy status:
High CPU/Memory usage
High CPU/Memory usage
Review metrics and adjust resource limits:Consider enabling profiling to identify bottlenecks (see Monitoring section).
Next Steps
Configure SSO
Set up Single Sign-On for your team
Add Clusters
Register external Kubernetes clusters
Monitoring
Set up Prometheus and Grafana
Backup & Restore
Implement disaster recovery