ancoleman/ai-design-components/implementing-gitops
Claude Code and agent skill by ancoleman/ai-design-components
- community
Checking that the SKILL.md file is still in the repository.
Implement GitOps continuous delivery for Kubernetes using ArgoCD or Flux. Use for automated deployments with Git as single source of truth, pull-based delivery, drift detection, multi-cluster management, and progressive rollouts.
Install
npx vskill@latest install ancoleman/ai-design-components/implementing-gitopsSKILL.md
GitOps Workflows
Implement GitOps continuous delivery for Kubernetes using declarative, pull-based deployment models where Git serves as the single source of truth for infrastructure and application configuration.
When to Use
Use GitOps workflows for:
- Kubernetes Deployments: Automating application and infrastructure deployments to Kubernetes clusters
- Multi-Cluster Management: Managing deployments across development, staging, production, and edge clusters
- Continuous Delivery: Implementing pull-based CD pipelines with automated reconciliation
- Drift Detection: Automatically detecting and correcting configuration drift from desired state
- Audit Requirements: Maintaining complete audit trails via Git commits for compliance
- Progressive Delivery: Implementing canary, blue-green, or rolling deployment strategies
- Disaster Recovery: Enabling rapid cluster recovery with GitOps bootstrap processes
Trigger keywords: "deploy to Kubernetes", "ArgoCD setup", "Flux bootstrap", "GitOps pipeline", "environment promotion", "multi-cluster deployment", "automated reconciliation"
Core GitOps Principles
1. Git as Single Source of Truth
All system configuration stored in Git repositories. No manual kubectl apply or cluster modifications. Declarative manifests (YAML) for all Kubernetes resources, environment-specific overlays, infrastructure configuration, and application deployments.
2. Pull-Based Deployment
Operators running inside clusters pull changes from Git and apply them automatically. Benefits include no cluster credentials in CI/CD pipelines, support for air-gapped environments, self-healing through continuous reconciliation, and simplified CI/CD.
3. Automated Reconciliation
GitOps operators continuously compare actual cluster state with desired state in Git and reconcile differences through a continuous loop: watch Git, compare live state, apply differences, report status, repeat.
4. Declarative Configuration
Use declarative Kubernetes manifests (not imperative scripts) to define desired state.
Tool Selection
ArgoCD vs Flux
| Decision Factor | Choose ArgoCD | Choose Flux | |
|---|---|---|---|
| Team Preference | Visual management with web UI | CLI/API-first workflows | |
| Learning Curve | Easier onboarding with UI | Steeper but more flexible | |
| Architecture | Monolithic, stateful controller | Modular, stateless controllers | |
| Multi-Tenancy | Built-in RBAC and projects | Kubernetes-native RBAC | |
| Resource Usage | Higher (includes UI components) | Lower (minimal controllers) | |
| Best For | Transitioning to GitOps | Platform engineering |
Hybrid Approach: Some teams use Flux for infrastructure and ArgoCD for applications.
For ArgoCD implementation patterns, see references/argocd-patterns.md For Flux implementation patterns, see references/flux-patterns.md For Kustomize overlay patterns, see references/kustomize-overlays.md
Quick Start
ArgoCD Installation
Basic Application:
Flux Bootstrap
Basic Kustomization:
For complete examples, see examples/argocd/ and examples/flux/
Environment Promotion
Branch-Based Strategy: dev branch → staging branch → main branch (prod) Kustomize-Based Strategy: k8s/base/ → k8s/overlays/{dev,staging,prod}/
Promotion Process:
- Merge code changes to main branch
- CI builds container image with tag
- Update image tag in environment overlay (Git commit)
- GitOps operator detects change and deploys
- Test in environment
- Promote to next environment by updating Git
For multi-environment ApplicationSet patterns, see references/argocd-patterns.md
Multi-Cluster Management
ArgoCD: Register external clusters with argocd CLI, use ApplicationSets to generate Applications per cluster, manage from single ArgoCD instance.
Flux: Bootstrap Flux per cluster, use same Git repo with cluster-specific paths, configure remote clusters via kubeConfig secrets.
For detailed multi-cluster patterns, see references/multi-cluster.md
Progressive Delivery
Canary Deployments: Gradually shift traffic to new version, monitor metrics during rollout, automated rollback on failures.
Blue-Green Deployments: Deploy new version alongside old, switch traffic atomically, instant rollback if issues detected.
ArgoCD: Use Argo Rollouts for progressive delivery Flux: Integrate Flagger for automated canary analysis
For progressive delivery strategies and Argo Rollouts examples, see references/progressive-delivery.md
Secret Management
GitOps requires storing configuration in Git, but secrets must be protected.
| Tool | Approach | Security | Complexity | |
|---|---|---|---|---|
| Sealed Secrets | Encrypt secrets for Git | Medium | Low | |
| SOPS | Encrypt files with KMS | High | Medium | |
| External Secrets | Reference external vaults | High | Medium | |
| HashiCorp Vault | Central secret management | Very High | High |
For secret management integration patterns, see references/secret-management.md
Drift Detection and Remediation
GitOps operators continuously monitor for drift between Git (desired state) and cluster (actual state).
ArgoCD Automatic Self-Healing:
Flux Automatic Reconciliation:
Manual Operations:
For drift detection strategies and troubleshooting, see references/drift-remediation.md
Sync Hooks and Lifecycle
Execute operations before/after syncs using hooks.
PreSync Hook (Database Migration):
PostSync Hook (Smoke Test):
For complete sync hook examples, see examples/argocd/sync-hooks.yaml
Monitoring and Observability
Key Metrics
- Sync Status: OutOfSync, Synced, Unknown
- Sync Frequency: How often reconciliation occurs
- Drift Detection: Time to detect configuration drift
- Sync Duration: Time to apply changes
- Failure Rate: Failed syncs and causes
ArgoCD Metrics: Exposed at /metrics endpoint (argocd_app_sync_total, argocd_app_info) Flux Metrics: From controllers (gotk_reconcile_condition, gotk_reconcile_duration_seconds)
Troubleshooting
Common Issues
Sync Stuck/OutOfSync:
- Check Git repository accessibility
- Verify manifests are valid YAML
- Review sync logs for errors
- Check resource finalizers
Self-Heal Not Working:
- Verify selfHeal enabled in syncPolicy
- Check operator has write permissions
- Review resource ownership labels
Secrets Not Decrypting:
- Verify SOPS/ESO controllers installed
- Check KMS/Vault credentials
- Review encryption key configuration
CLI Quick Reference
ArgoCD Commands
Flux Commands
Kustomize Commands
Installation Scripts
Use the provided installation scripts for quick setup:
Example Files
Complete working examples provided in examples/ directory:
ArgoCD Examples:
- examples/argocd/application.yaml - Basic Application
- examples/argocd/applicationset.yaml - Multi-environment ApplicationSet
- examples/argocd/progressive-rollout.yaml - Progressive rollout strategy
- examples/argocd/sync-hooks.yaml - PreSync/PostSync hooks
Flux Examples:
- examples/flux/gitrepository.yaml - Git source configuration
- examples/flux/kustomization.yaml - Kustomization controller
- examples/flux/helmrelease.yaml - Helm release management
- examples/flux/ocirepository.yaml - OCI artifact source
Kustomize Examples:
- examples/kustomize/base/ - Base configuration
- examples/kustomize/overlays/{dev,staging,prod}/ - Environment overlays
Rollout Examples:
- examples/rollouts/canary.yaml - Canary deployment with Argo Rollouts
- examples/rollouts/blue-green.yaml - Blue-green deployment strategy
Related Skills
- kubernetes-operations: Kubernetes fundamentals and resource management
- infrastructure-as-code: Provisioning clusters that GitOps deploys to
- building-ci-pipelines: CI builds images, GitOps deploys them
- secret-management: Vault/ESO integration with GitOps
- deploying-applications: GitOps as the deployment mechanism
Summary
GitOps provides automated, declarative continuous delivery for Kubernetes with Git as the single source of truth. Choose ArgoCD for UI-driven workflows or Flux for CLI/API-first approaches. Implement automated reconciliation, drift detection, and progressive delivery for reliable deployments at scale. Integrate secret management, multi-cluster orchestration, and disaster recovery for production-grade GitOps workflows.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/implementing-gitops/SKILL.md
Popularity
- Repository stars
- 352
- Repository forks
- 54
- 7-day trend score
- 29
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 6 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ancoleman/ai-design-components/implementing-gitops)