Skills · Infrastructure & ops

Gitops Workflow

Unverified21/40

Implement GitOps workflows with ArgoCD and Flux for automated, declarative Kubernetes deployments with continuous reconciliation. Use when implementing GitOps practices, automating Kubernetes deployments, or setting up declarative infrastructure management.

Originally by wshobson · MIT

Claude CodePartialHas SKILL.md but declares no allowed-tools — Claude Code will ask for permission each time
Cursor·UnknownWe have not crawled the repo tree, so we will not guess
Codex·UnknownWe have not crawled the repo tree, so we will not guess
Gemini CLI·UnknownThe spec defines no detection rule for Gemini
Copilot·UnknownWe have not crawled the repo tree, so we will not guess
npx agentalley add gitops-workflow

This command does not work yet — the CLI is still being built. Until then, use Raw in the reader below to take the file.

Who is stuck, and on what

Implement GitOps workflows with ArgoCD and Flux for automated, declarative Kubernetes deployments with continuous reconciliation. Use when implementing GitOps practices, automating Kubernetes deployments, or setting up declarative infrastructure management.

The whole source

No sign-in, no blur, nothing truncated
gitops-workflow/SKILL.md290 lines5.8 KBRawView on GitHub
Frontmatter — 2 properties
namegitops-workflow
descriptionImplement GitOps workflows with ArgoCD and Flux for automated, declarative Kubernetes deployments with continuous reconciliation. Use when implementing GitOps practices, automating Kubernetes deployments, or setting up declarative infrastructure management.
1---
2name: gitops-workflow
3description: Implement GitOps workflows with ArgoCD and Flux for automated, declarative Kubernetes deployments with continuous reconciliation. Use when implementing GitOps practices, automating Kubernetes deployments, or setting up declarative infrastructure management.
4---A5No allowed-tools declared — no way to tell what this skill may touch
5 
6# GitOps Workflow
7 
8Complete guide to implementing GitOps workflows with ArgoCD and Flux for automated Kubernetes deployments.
9 
10## Purpose
11 
12Implement declarative, Git-based continuous delivery for Kubernetes using ArgoCD or Flux CD, following OpenGitOps principles.
13 
14## When to Use This Skill
15 
16- Set up GitOps for Kubernetes clusters
17- Automate application deployments from Git
18- Implement progressive delivery strategies
19- Manage multi-cluster deployments
20- Configure automated sync policies
21- Set up secret management in GitOps
22 
23## OpenGitOps Principles
24 
251. **Declarative** - Entire system described declaratively
262. **Versioned and Immutable** - Desired state stored in Git
273. **Pulled Automatically** - Software agents pull desired state
284. **Continuously Reconciled** - Agents reconcile actual vs desired state
29 
30## ArgoCD Setup
31 
32### 1. Installation
33 
34```bash
35# Create namespace
36kubectl create namespace argocd
37 
38# Install ArgoCD
39kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
40 
41# Get admin password
42kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
43```
44 
45**Reference:** See `references/argocd-setup.md` for detailed setup
46 
47### 2. Repository Structure
48 
49```
50gitops-repo/
51├── apps/
52│ ├── production/
53│ │ ├── app1/
54│ │ │ ├── kustomization.yaml
55│ │ │ └── deployment.yaml
56│ │ └── app2/
57│ └── staging/
58├── infrastructure/
59│ ├── ingress-nginx/
60│ ├── cert-manager/
61│ └── monitoring/
62└── argocd/
63 ├── applications/
64 └── projects/
65```
66 
67### 3. Create Application
68 
69```yaml
70# argocd/applications/my-app.yaml
71apiVersion: argoproj.io/v1alpha1
72kind: Application
73metadata:
74 name: my-app
75 namespace: argocd
76spec:
77 project: default
78 source:
79 repoURL: https://github.com/org/gitops-repo
80 targetRevision: main
81 path: apps/production/my-app
82 destination:
83 server: https://kubernetes.default.svc
84 namespace: production
85 syncPolicy:
86 automated:
87 prune: true
88 selfHeal: true
89 syncOptions:
90 - CreateNamespace=true
91```
92 
93### 4. App of Apps Pattern
94 
95```yaml
96apiVersion: argoproj.io/v1alpha1
97kind: Application
98metadata:
99 name: applications
100 namespace: argocd
101spec:
102 project: default
103 source:
104 repoURL: https://github.com/org/gitops-repo
105 targetRevision: main
106 path: argocd/applications
107 destination:
108 server: https://kubernetes.default.svc
109 namespace: argocd
110 syncPolicy:
111 automated: {}
112```
113 
114## Flux CD Setup
115 
116### 1. Installation
117 
118```bash
119# Install Flux CLI
120curl -s https://fluxcd.io/install.sh | sudo bashA1Downloads and executes without reading firstA4This skill pulls in web or user content but never says to treat that content as data. A signal, not proof.
121 
122# Bootstrap Flux
123flux bootstrap github \
124 --owner=org \
125 --repository=gitops-repo \
126 --branch=main \
127 --path=clusters/production \
128 --personal
129```
130 
131### 2. Create GitRepository
132 
133```yaml
134apiVersion: source.toolkit.fluxcd.io/v1
135kind: GitRepository
136metadata:
137 name: my-app
138 namespace: flux-system
139spec:
140 interval: 1m
141 url: https://github.com/org/my-app
142 ref:
143 branch: main
144```
145 
146### 3. Create Kustomization
147 
148```yaml
149apiVersion: kustomize.toolkit.fluxcd.io/v1
150kind: Kustomization
151metadata:
152 name: my-app
153 namespace: flux-system
154spec:
155 interval: 5m
156 path: ./deploy
157 prune: true
158 sourceRef:
159 kind: GitRepository
160 name: my-app
161```
162 
163## Sync Policies
164 
165### Auto-Sync Configuration
166 
167**ArgoCD:**
168 
169```yaml
170syncPolicy:
171 automated:
172 prune: true # Delete resources not in Git
173 selfHeal: true # Reconcile manual changes
174 allowEmpty: false
175 retry:
176 limit: 5
177 backoff:
178 duration: 5s
179 factor: 2
180 maxDuration: 3m
181```
182 
183**Flux:**
184 
185```yaml
186spec:
187 interval: 1m
188 prune: true
189 wait: true
190 timeout: 5m
191```
192 
193**Reference:** See `references/sync-policies.md`
194 
195## Progressive Delivery
196 
197### Canary Deployment with ArgoCD Rollouts
198 
199```yaml
200apiVersion: argoproj.io/v1alpha1
201kind: Rollout
202metadata:
203 name: my-app
204spec:
205 replicas: 5
206 strategy:
207 canary:
208 steps:
209 - setWeight: 20
210 - pause: { duration: 1m }
211 - setWeight: 50
212 - pause: { duration: 2m }
213 - setWeight: 100
214```
215 
216### Blue-Green Deployment
217 
218```yaml
219strategy:
220 blueGreen:
221 activeService: my-app
222 previewService: my-app-preview
223 autoPromotionEnabled: false
224```
225 
226## Secret Management
227 
228### External Secrets Operator
229 
230```yaml
231apiVersion: external-secrets.io/v1beta1
232kind: ExternalSecret
233metadata:
234 name: db-credentials
235spec:
236 refreshInterval: 1h
237 secretStoreRef:
238 name: aws-secrets-manager
239 kind: SecretStore
240 target:
241 name: db-credentials
242 data:
243 - secretKey: password
244 remoteRef:
245 key: prod/db/password
246```
247 
248### Sealed Secrets
249 
250```bash
251# Encrypt secret
252kubeseal --format yaml < secret.yaml > sealed-secret.yaml
253 
254# Commit sealed-secret.yaml to Git
255```
256 
257## Best Practices
258 
2591. **Use separate repos or branches** for different environments
2602. **Implement RBAC** for Git repositories
2613. **Enable notifications** for sync failures
2624. **Use health checks** for custom resources
2635. **Implement approval gates** for production
2646. **Keep secrets out of Git** (use External Secrets)
2657. **Use App of Apps pattern** for organization
2668. **Tag releases** for easy rollback
2679. **Monitor sync status** with alerts
26810. **Test changes** in staging first
269 
270## Troubleshooting
271 
272**Sync failures:**
273 
274```bash
275argocd app get my-app
276argocd app sync my-app --prune
277```
278 
279**Out of sync status:**
280 
281```bash
282argocd app diff my-app
283argocd app sync my-app --force
284```
285 
286## Related Skills
287 
288- `k8s-manifest-generator` - For creating manifests
289- `helm-chart-scaffolding` - For packaging applications
290 

Reviews

Installed this one?Write the first review and take the Trailblazer badge.

Reviews only open after a real install, so this is empty — and we leave it empty rather than invent one.

Alternatives

Also in Infrastructure & ops