ArgoCD Troubleshooting Guide
Comprehensive troubleshooting guide for common ArgoCD issues across different cloud providers
ArgoCD Troubleshooting Guide
This guide covers common issues and their solutions when running ArgoCD across different cloud providers.
Video Tutorial
Learn more about troubleshooting ArgoCD in this comprehensive video tutorial:
Common Issues
1. Application Sync Issues
Symptom: Application Stuck in “OutOfSync” State
# Check application status
kubectl get application -n argocd
# Check detailed sync status
argocd app get my-app
Solutions:
- Check Git Repository Access
# Test repository access
argocd repo list
argocd repo test https://github.com/org/repo.git
- Verify RBAC Permissions
# Check RBAC configuration
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-rbac-cm
namespace: argocd
data:
policy.csv: |
p, role:org-admin, applications, *, */*, allow
- Check Resource Health
# Get resource health status
argocd app resources my-app
kubectl describe application my-app -n argocd
2. Authentication Issues
Symptom: Unable to Login to ArgoCD UI
Solutions:
- Reset Admin Password
# Get initial admin password
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
# Update password
argocd account update-password
- Check SSO Configuration
# Verify SSO settings
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
data:
url: https://argocd.example.com
dex.config: |
connectors:
- type: github
id: github
name: GitHub
config:
clientID: aabbccddeeff00112233
clientSecret: $dex.github.clientSecret
3. Network Connectivity Issues
Symptom: Unable to Access ArgoCD UI or API
Solutions:
- Check Ingress Configuration
# Verify ingress status
kubectl get ingress -n argocd
kubectl describe ingress argocd-server-ingress -n argocd
- Test Network Policies
# Verify network policies
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: argocd-server-network-policy
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: argocd-server
ingress:
- {}
- Check Service Status
# Verify service status
kubectl get svc -n argocd
kubectl describe svc argocd-server -n argocd
4. Resource Management Issues
Symptom: High Memory/CPU Usage
Solutions:
- Check Resource Limits
# Adjust resource limits
apiVersion: apps/v1
kind: Deployment
metadata:
name: argocd-server
spec:
template:
spec:
containers:
- name: argocd-server
resources:
limits:
cpu: 1000m
memory: 1Gi
requests:
cpu: 500m
memory: 512Mi
- Enable Application Resource Tracking
# Configure resource tracking
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
data:
resource.customizations: |
argoproj.io/Application:
health.lua: |
hs = {}
hs.status = "Healthy"
return hs
5. Cloud Provider Specific Issues
AWS EKS Issues
- IRSA Configuration
# Verify IAM role
aws iam get-role --role-name argocd-role
# Check pod identity
kubectl exec -it deploy/argocd-server -n argocd -- aws sts get-caller-identity
- ALB Issues
# Check ALB controller logs
kubectl logs -n kube-system deployment.apps/aws-load-balancer-controller
# Verify target group binding
kubectl get targetgroupbinding -n argocd
GCP GKE Issues
- Workload Identity
# Verify workload identity
kubectl run -it --rm debug --image=google/cloud-sdk:slim --serviceaccount=argocd-server -n argocd -- gcloud auth list
# Check IAM binding
gcloud iam service-accounts get-iam-policy argocd@PROJECT_ID.iam.gserviceaccount.com
- GCP Load Balancer
# Check ingress status
kubectl describe ingress argocd-server-ingress -n argocd
# Verify backend service
gcloud compute backend-services list
Azure AKS Issues
- Azure AD Integration
# Check pod identity status
kubectl get azureidentity -n argocd
kubectl get azureidentitybinding -n argocd
# Verify managed identity
az identity show --name argocd-identity --resource-group argocd-rg
- Application Gateway
# Check application gateway health
az network application-gateway show-backend-health -g argocd-rg -n argocd-appgw
# Verify routing rules
az network application-gateway rule list -g argocd-rg --gateway-name argocd-appgw
6. Performance Optimization
Symptom: Slow Application Sync
Solutions:
- Enable Parallel Processing
# Configure parallel processing
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
data:
controller.parallel.limit: "10"
- Optimize Resource Hooks
# Configure resource hooks
apiVersion: batch/v1
kind: Job
metadata:
name: backup-job
annotations:
argocd.argoproj.io/hook: PreSync
argocd.argoproj.io/hook-delete-policy: HookSucceeded
7. Backup and Recovery
Symptom: Data Loss or Corruption
Solutions:
- Configure Backup
# Setup backup
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
data:
backup.schedule: "0 * * * *"
backup.retention: "720h"
- Restore from Backup
# Restore procedure
argocd admin backup restore /path/to/backup.db
# Verify restoration
argocd app list
Diagnostic Commands
1. Application Diagnostics
# Get application status
argocd app get my-app
# Check sync history
argocd app history my-app
# View logs
argocd app logs my-app
2. Cluster Health
# Check cluster status
argocd cluster list
# Verify cluster resources
kubectl get pods -n argocd
kubectl top pods -n argocd
3. Repository Management
# List repositories
argocd repo list
# Test repository connection
argocd repo test https://github.com/org/repo.git
Best Practices for Prevention
-
Regular Monitoring
- Set up alerts for sync failures
- Monitor resource usage
- Track application health
-
Backup Strategy
- Regular backups
- Test restore procedures
- Document recovery process
-
Security Measures
- Regular secret rotation
- RBAC review
- Network policy audit
-
Resource Management
- Set appropriate limits
- Configure auto-scaling
- Monitor resource usage
Common Error Messages and Solutions
Error Message | Possible Cause | Solution |
---|---|---|
”Unable to sync” | Git repo issues | Check credentials and connectivity |
”Connection refused” | Network policy | Review network policies |
”Permission denied” | RBAC issues | Check RBAC configuration |
”Out of memory” | Resource limits | Adjust resource limits |
Logging and Debugging
1. Enable Debug Logging
# Configure logging
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
data:
logging.level: debug
logging.format: json
2. Log Collection
# Collect logs
kubectl logs -n argocd -l app.kubernetes.io/name=argocd-server
kubectl logs -n argocd -l app.kubernetes.io/name=argocd-repo-server
kubectl logs -n argocd -l app.kubernetes.io/name=argocd-application-controller
Conclusion
When troubleshooting ArgoCD:
- Identify the specific component causing issues
- Check logs and error messages
- Use appropriate diagnostic commands
- Follow cloud provider specific guidelines
- Document solutions for future reference