| name | argocd-gitops |
| description | GitOps workflows with ArgoCD for Kubernetes deployments |
| homepage | https://argo-cd.readthedocs.io/ |
| metadata | {"emoji":"🔄","version":"1.0.0","author":"Gourav Shah","license":"MIT","requires":{"bins":["argocd"]},"tags":["argocd","gitops","kubernetes","deployment"]} |
ArgoCD GitOps
GitOps workflows for Kubernetes deployments using ArgoCD.
When to Use This Skill
Use this skill when:
- Deploying applications via GitOps
- Managing ArgoCD applications
- Syncing or rolling back deployments
- Troubleshooting sync issues
ArgoCD CLI Setup
Login
argocd login argocd.example.com
argocd login argocd.example.com --sso
argocd login argocd.example.com --insecure
argocd context
Application Management
List Applications
argocd app list
argocd app list -o wide
argocd app list -o json
argocd app list -p myproject
argocd app list -l team=backend
View Application
argocd app get myapp
argocd app manifests myapp
argocd app diff myapp
argocd app history myapp
Application Health
argocd app get myapp -o json | jq '.status.health.status'
argocd app resources myapp
argocd app logs myapp
Sync Operations
Sync Application
argocd app sync myapp
argocd app sync myapp --prune
argocd app sync myapp --resource :Deployment:myapp
argocd app sync myapp --dry-run
argocd app sync myapp --force
argocd app wait myapp
Sync Options
argocd app sync myapp --validate=false
argocd app sync myapp --apply-out-of-sync-only
argocd app sync myapp --timeout 300
Auto-Sync
argocd app set myapp --sync-policy automated
argocd app set myapp --sync-policy automated --auto-prune
argocd app set myapp --self-heal
argocd app set myapp --sync-policy none
Rollback
Rollback to Previous
argocd app history myapp
argocd app rollback myapp <history-id>
argocd app rollback myapp --revision HEAD~1
Rollback Strategies
argocd app history myapp
argocd app rollback myapp 5
git revert HEAD
git push
argocd app sync myapp
argocd app set myapp --revision <old-commit>
argocd app sync myapp
Multi-Environment Promotion
Typical Flow
git commit -m "feat: new feature"
git push origin main
argocd app set myapp-staging --revision $(argocd app get myapp-dev -o json | jq -r '.status.sync.revision')
argocd app sync myapp-staging
argocd app set myapp-prod --revision <staging-revision>
argocd app sync myapp-prod
Environment-Specific Overrides
argocd app set myapp-prod --values-literal-file values-prod.yaml
argocd app set myapp-staging --kustomize-image nginx=nginx:1.25
Create Applications
From Git Repository
argocd app create myapp \
--repo https://github.com/org/repo.git \
--path k8s/overlays/production \
--dest-server https://kubernetes.default.svc \
--dest-namespace production \
--project default
argocd app create myapp \
--repo https://github.com/org/repo.git \
--path charts/myapp \
--dest-server https://kubernetes.default.svc \
--dest-namespace production \
--helm-set image.tag=v1.2.3
From Helm Repository
argocd app create myapp \
--repo https://charts.example.com \
--helm-chart myapp \
--revision 1.2.3 \
--dest-server https://kubernetes.default.svc \
--dest-namespace production
Troubleshooting
Sync Failures
argocd app get myapp
argocd app get myapp -o json | jq '.status.conditions'
argocd app resources myapp
argocd app logs myapp
Common Issues
| Issue | Cause | Fix |
|---|
| OutOfSync | Drift from Git | argocd app sync myapp |
| SyncFailed | Invalid manifests | Check argocd app get myapp |
| Degraded | Pods unhealthy | Check pod logs |
| Unknown | Can't reach cluster | Check network/auth |
Force Refresh
argocd app get myapp --refresh
argocd app get myapp --hard-refresh
Stuck Sync
argocd app terminate-op myapp
argocd app sync myapp --force
Project Management
argocd proj list
argocd proj create myproject \
--src https://github.com/org/* \
--dest https://kubernetes.default.svc,production
argocd proj get myproject
Clusters
argocd cluster list
argocd cluster add my-context
argocd cluster rm https://cluster.example.com
Notifications (Status Checks)
argocd app wait myapp --health --timeout 300
argocd app get myapp -o json | jq -e '.status.health.status == "Healthy"'
Quick Reference
argocd app set myapp --revision <commit-sha>
argocd app sync myapp --prune
argocd app wait myapp --health
argocd app history myapp
argocd app rollback myapp <id>
argocd app get myapp --hard-refresh
argocd app sync myapp
GitOps Best Practices
- Never modify cluster directly - All changes through Git
- Use ApplicationSets - For multi-cluster/environment
- Enable auto-prune - Keep cluster clean
- Use sync waves - For ordered deployments
- Separate config repos - App code vs deployment config
- Review before production - Manual sync gates
Related Skills
- k8s-deploy: For direct Kubernetes deployments
- git-workflow: For managing GitOps repos
- incident-response: For deployment-related incidents