Overview
Flux CD is a GitOps toolkit for Kubernetes using source, kustomize, helm, and notification controllers. Declarative CRDs manage the entire delivery pipeline.
Capabilities
- Source controllers (Git, OCI, Helm repos, S3)
- Kustomize and Helm release controllers
- Image automation (scan repos, update manifests)
- Alert providers (Slack, Discord, PagerDuty)
- Multi-tenancy with impersonation
- Dependency management between resources
When to Use
Trigger phrases:
"fluxcd gitops"
"Flux CD GitOps — source controllers, kustomize/helm controllers, image automatio"
Kubernetes GitOps without a separate UI
Prefer CRD-only approach over Application objects
Need image automation (auto-update on new images)
Multi-tenant clusters with namespace isolation
Pseudo Source
- Configure automation, controllers, flux, fluxcd, gitops settings before first use
GitRepository
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: fleet
namespace: flux-system
spec:
interval: 1m
url: https://github.com/org/fleet
ref:
branch: main
secretRef:
name: github-credentials
Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: myapp
namespace: flux-system
spec:
interval: 10m
sourceRef:
kind: GitRepository
name: fleet
path: ./apps/myapp/production
prune: true
healthChecks:
- apiVersion: apps/v1
kind: Deployment
name: myapp
namespace: production
timeout: 5m
dependsOn:
- name: infrastructure
HelmRelease
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: nginx
namespace: production
spec:
interval: 10m
chart:
spec:
chart: nginx
sourceRef:
kind: HelmRepository
name: bitnami
version: "15.x.x"
values:
replicaCount: 3
service:
type: ClusterIP
Image Automation
# Scan image repos
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImageRepository
metadata:
name: myapp
spec:
image: ghcr.io/org/myapp
interval: 5m
---
# Update policy
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImagePolicy
metadata:
name: myapp
spec:
imageRepositoryRef:
name: myapp
policy:
semver:
range: ">=2.0.0 <3.0.0"
Notifications
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
name: on-call
spec:
providerRef:
name: slack
eventSeverity: info
eventSources:
- kind: Kustomization
name: '*'
Common Patterns
- Bootstrapping:
flux bootstrap github --owner=org --repository=fleet
- Multi-tenancy: namespace isolation with service account impersonation
- OCI sources: store manifests as OCI artifacts
- SOPS secrets: encrypted secrets in Git with Mozilla SOPS
How to Use
- Define infrastructure as code (Terraform, CloudFormation, Pulumi)
- Review changes through PR process before applying
- Configure monitoring and alerting for critical paths
- Set up secrets management (Vault, AWS Secrets Manager, etc.)
- Document runbooks for deployment, rollback, and incident response
- Test disaster recovery procedures regularly
When NOT to Use
- Task is outside your authorization scope
- You need to implement controls (use implementing-* skills)
- Task is about analysis, not action (use analyzing-* skills)
- You don't have access to target systems
- Task requires compliance expertise (consult professionals)
- Task is about defense, not offense (use defensive skills)
Red Flags
- Infrastructure changes without review: Unreviewed changes cause outages — use PRs for infra code
- No rollback strategy: Every deployment needs a tested rollback plan before it runs
- Secrets in configuration files: Secrets in YAML/JSON get committed to version control
- Missing monitoring and alerting: Without monitoring, outages go undetected until users report them
- No documentation for runbooks: Without runbooks, on-call engineers waste time re-discovering procedures
Verification
Process
- Analyze the task requirements
- Apply domain expertise
- Verify output quality
Anti-Rationalization Table
| Rationalization |
Reality |
| "Manual deployments are fine" |
Manual deployments are error-prone and不可 repeatable. Automate. |
| "We do not need monitoring" |
Without monitoring, you are flying blind. Add observability from day one. |
| "Infrastructure as code is overkill" |
IaC enables reproducibility, version control, and disaster recovery. |
1---2name: fluxcd-gitops3description: Use when flux CD GitOps — source controllers, kustomize/helm controllers,4 image automation, notifications. Use when working with fluxcd gitops.5domain: devops6author: oyi777license: Apache-2.08subdomain: devops9tags:10- ci-cd11- devops12- fluxcd13- gitops14- infrastructure15version: 1.0.016category: devops17metadata:18 source: https://skillmd.com/skills/oyi77/fluxcd-gitops19---20212223## Overview2425Flux CD is a GitOps toolkit for Kubernetes using source, kustomize, helm, and notification controllers. Declarative CRDs manage the entire delivery pipeline.2627## Capabilities2829- Source controllers (Git, OCI, Helm repos, S3)30- Kustomize and Helm release controllers31- Image automation (scan repos, update manifests)32- Alert providers (Slack, Discord, PagerDuty)33- Multi-tenancy with impersonation34- Dependency management between resources3536## When to Use37**Trigger phrases:**38- "fluxcd gitops"39- "Flux CD GitOps — source controllers, kustomize/helm controllers, image automatio"404142- Kubernetes GitOps without a separate UI43- Prefer CRD-only approach over Application objects44- Need image automation (auto-update on new images)45- Multi-tenant clusters with namespace isolation4647## Pseudo Source4849- Configure automation, controllers, flux, fluxcd, gitops settings before first use505152### GitRepository53```yaml54apiVersion: source.toolkit.fluxcd.io/v155kind: GitRepository56metadata:57 name: fleet58 namespace: flux-system59spec:60 interval: 1m61 url: https://github.com/org/fleet62 ref:63 branch: main64 secretRef:65 name: github-credentials66```6768### Kustomization69```yaml70apiVersion: kustomize.toolkit.fluxcd.io/v171kind: Kustomization72metadata:73 name: myapp74 namespace: flux-system75spec:76 interval: 10m77 sourceRef:78 kind: GitRepository79 name: fleet80 path: ./apps/myapp/production81 prune: true82 healthChecks:83 - apiVersion: apps/v184 kind: Deployment85 name: myapp86 namespace: production87 timeout: 5m88 dependsOn:89 - name: infrastructure90```9192### HelmRelease93```yaml94apiVersion: helm.toolkit.fluxcd.io/v2beta195kind: HelmRelease96metadata:97 name: nginx98 namespace: production99spec:100 interval: 10m101 chart:102 spec:103 chart: nginx104 sourceRef:105 kind: HelmRepository106 name: bitnami107 version: "15.x.x"108 values:109 replicaCount: 3110 service:111 type: ClusterIP112```113114### Image Automation115```yaml116# Scan image repos117apiVersion: image.toolkit.fluxcd.io/v1beta2118kind: ImageRepository119metadata:120 name: myapp121spec:122 image: ghcr.io/org/myapp123 interval: 5m124---125# Update policy126apiVersion: image.toolkit.fluxcd.io/v1beta2127kind: ImagePolicy128metadata:129 name: myapp130spec:131 imageRepositoryRef:132 name: myapp133 policy:134 semver:135 range: ">=2.0.0 <3.0.0"136```137138### Notifications139```yaml140apiVersion: notification.toolkit.fluxcd.io/v1beta3141kind: Alert142metadata:143 name: on-call144spec:145 providerRef:146 name: slack147 eventSeverity: info148 eventSources:149 - kind: Kustomization150 name: '*'151```152153## Common Patterns154155- **Bootstrapping**: `flux bootstrap github --owner=org --repository=fleet`156- **Multi-tenancy**: namespace isolation with service account impersonation157- **OCI sources**: store manifests as OCI artifacts158- **SOPS secrets**: encrypted secrets in Git with Mozilla SOPS159160## How to Use1611621. Define infrastructure as code (Terraform, CloudFormation, Pulumi)1632. Review changes through PR process before applying1643. Configure monitoring and alerting for critical paths1654. Set up secrets management (Vault, AWS Secrets Manager, etc.)1665. Document runbooks for deployment, rollback, and incident response1676. Test disaster recovery procedures regularly168169## When NOT to Use170171- Task is outside your authorization scope172- You need to implement controls (use implementing-* skills)173- Task is about analysis, not action (use analyzing-* skills)174- You don't have access to target systems175- Task requires compliance expertise (consult professionals)176- Task is about defense, not offense (use defensive skills)177178179## Red Flags180181- **Infrastructure changes without review**: Unreviewed changes cause outages — use PRs for infra code182- **No rollback strategy**: Every deployment needs a tested rollback plan before it runs183- **Secrets in configuration files**: Secrets in YAML/JSON get committed to version control184- **Missing monitoring and alerting**: Without monitoring, outages go undetected until users report them185- **No documentation for runbooks**: Without runbooks, on-call engineers waste time re-discovering procedures186187## Verification188189- [ ] Skill output matches expected behavior190191## Process1921931. Analyze the task requirements1942. Apply domain expertise1953. Verify output quality196197## Anti-Rationalization Table198199| Rationalization | Reality |200|---|---|201| "Manual deployments are fine" | Manual deployments are error-prone and不可 repeatable. Automate. |202| "We do not need monitoring" | Without monitoring, you are flying blind. Add observability from day one. |203| "Infrastructure as code is overkill" | IaC enables reproducibility, version control, and disaster recovery. |