Automated summary
This skill provides a guide for implementing GitOps workflows for Kubernetes with ArgoCD or Flux, including repository layout, manifest examples, and sync policies.
Strengths
- Covers OpenGitOps principles and installation steps for ArgoCD and Flux.
- Provides concrete manifest examples for Application, App of Apps, GitRepository, and Kustomization resources.
- Includes security safeguards around automatic production sync and secret handling.
Limitations
- The content is mostly introductory and does not detail rollback procedures, multi-cluster setups, or progressive delivery despite mentioning them.
- Secret management is recommended but not implemented in detail, such as with Sealed Secrets or an external secret manager.
- Assumes operational access to the Kubernetes cluster and Git repositories.
Use this skill to design or bootstrap a Kubernetes GitOps setup with ArgoCD or Flux.
Avoid it for a one-off manual deployment, non-Kubernetes workloads, or when you lack cluster and repository access.
Security analysis
CautionThis is a legitimate documentation/reference skill for GitOps tooling, with no obfuscated payloads, no secret exfiltration, and no attempts to alter agent behavior. The risk comes from standard-but-powerful operational commands: an unverified curl|sh installer, unpinned remote manifest applies, and auto-prune/self-heal configs that can delete or overwrite production resources if copied verbatim. The skill itself does include a Safety section warning against auto-sync to production without approvals and against storing secrets in Git, which mitigates intent but not the copy-paste hazard. Powerful-but-legitimate Kubernetes/CI operations => caution.
- •Includes a curl-to-shell install pattern: `curl -s https://fluxcd.io/install.sh | sudo bash`, which pipes a remote script directly into a root shell without verification (no checksum/signature check).
- •Applies remote manifests directly from a moving `stable` branch: `kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml` — unpinned supply-chain surface.
- •Ships production auto-sync examples (`prune: true`, `selfHeal: true`, `automated: {}`) that delete/reconcile live cluster resources; combined with `argocd app sync --force --prune` these are potentially destructive if followed literally against prod.
- •`base64 -d` on the argocd-initial-admin-secret prints the admin credential in cleartext to the terminal/history (handling hygiene, not exfiltration).
- •Contains a pipe-to-shell install pattern: `curl -s https://fluxcd.io/install.sh | sudo bash`. Although this is the official Flux install method, piping a remote script directly into a privileged shell is unverifiable and a supply-chain risk; users should download and inspect the script first.
- •Instructs `kubectl apply -f https://raw.githubusercontent.com/.../install.yaml`, applying a remote manifest from a mutable branch (`stable`) without pinning a version or checksum.
- •Includes commands that mutate or delete cluster state (`prune: true`, `argocd app sync --force`, `kubectl create namespace`), which can remove resources if used carelessly; the skill does warn against unapproved production auto-sync.
- •Reads the ArgoCD initial admin password via base64 decode; this is standard local retrieval, not exfiltration, but the resulting credential should be treated as sensitive.
- •No instructions to send data or secrets to external endpoints were found; secret handling guidance (External Secrets, Sealed Secrets, keep secrets out of Git) is sound.
Examples
Set up a GitOps repository structure for ArgoCD with production and staging apps, and create an Application manifest with automated sync, prune, and self-heal.Bootstrap Flux CD on a Kubernetes cluster from GitHub and create a GitRepository and Kustomization to deploy my app from the ./deploy folder.Review my ArgoCD GitOps setup for safe production sync policies and recommend how to keep Kubernetes secrets out of Git.name: gitops-workflow description: 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.
GitOps Workflow
Complete guide to implementing GitOps workflows with ArgoCD and Flux for automated Kubernetes deployments.
Purpose
Implement declarative, Git-based continuous delivery for Kubernetes using ArgoCD or Flux CD, following OpenGitOps principles.
Use this skill when
- Set up GitOps for Kubernetes clusters
- Automate application deployments from Git
- Implement progressive delivery strategies
- Manage multi-cluster deployments
- Configure automated sync policies
- Set up secret management in GitOps
Do not use this skill when
- You need a one-off manual deployment
- You cannot manage cluster access or repo permissions
- You are not deploying to Kubernetes
Instructions
- Define repo layout and desired-state conventions.
- Install ArgoCD or Flux and connect clusters.
- Configure sync policies, environments, and promotion flow.
- Validate rollbacks and secret handling.
Safety
- Avoid auto-sync to production without approvals.
- Keep secrets out of Git and use sealed or external secret managers.
OpenGitOps Principles
- Declarative - Entire system described declaratively
- Versioned and Immutable - Desired state stored in Git
- Pulled Automatically - Software agents pull desired state
- Continuously Reconciled - Agents reconcile actual vs desired state
ArgoCD Setup
1. Installation
# Create namespace
kubectl create namespace argocd
# Install ArgoCD
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
# Get admin password
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
Reference: See references/argocd-setup.md for detailed setup
2. Repository Structure
gitops-repo/
├── apps/
│ ├── production/
│ │ ├── app1/
│ │ │ ├── kustomization.yaml
│ │ │ └── deployment.yaml
│ │ └── app2/
│ └── staging/
├── infrastructure/
│ ├── ingress-nginx/
│ ├── cert-manager/
│ └── monitoring/
└── argocd/
├── applications/
└── projects/
3. Create Application
# argocd/applications/my-app.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-app
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/org/gitops-repo
targetRevision: main
path: apps/production/my-app
destination:
server: https://kubernetes.default.svc
namespace: production
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
4. App of Apps Pattern
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: applications
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/org/gitops-repo
targetRevision: main
path: argocd/applications
destination:
server: https://kubernetes.default.svc
namespace: argocd
syncPolicy:
automated: {}
Flux CD Setup
1. Installation
# Install Flux CLI
curl -s https://fluxcd.io/install.sh | sudo bash
# Bootstrap Flux
flux bootstrap github \
--owner=org \
--repository=gitops-repo \
--branch=main \
--path=clusters/production \
--personal
2. Create GitRepository
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: my-app
namespace: flux-system
spec:
interval: 1m
url: https://github.com/org/my-app
ref:
branch: main
3. Create Kustomization
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: my-app
namespace: flux-system
spec:
interval: 5m
path: ./deploy
prune: true
sourceRef:
kind: GitRepository
name: my-app
Sync Policies
Auto-Sync Configuration
ArgoCD:
syncPolicy:
automated:
prune: true # Delete resources not in Git
selfHeal: true # Reconcile manual changes
allowEmpty: false
retry:
limit: 5
backoff:
duration: 5s
factor: 2
maxDuration: 3m
Flux:
spec:
interval: 1m
prune: true
wait: true
timeout: 5m
Reference: See references/sync-policies.md
Progressive Delivery
Canary Deployment with ArgoCD Rollouts
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: my-app
spec:
replicas: 5
strategy:
canary:
steps:
- setWeight: 20
- pause: {duration: 1m}
- setWeight: 50
- pause: {duration: 2m}
- setWeight: 100
Blue-Green Deployment
strategy:
blueGreen:
activeService: my-app
previewService: my-app-preview
autoPromotionEnabled: false
Secret Management
External Secrets Operator
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: db-credentials
spec:
refreshInterval: 1h
secretStoreRef:
name: aws-secrets-manager
kind: SecretStore
target:
name: db-credentials
data:
- secretKey: password
remoteRef:
key: prod/db/password
Sealed Secrets
# Encrypt secret
kubeseal --format yaml < secret.yaml > sealed-secret.yaml
# Commit sealed-secret.yaml to Git
Best Practices
- Use separate repos or branches for different environments
- Implement RBAC for Git repositories
- Enable notifications for sync failures
- Use health checks for custom resources
- Implement approval gates for production
- Keep secrets out of Git (use External Secrets)
- Use App of Apps pattern for organization
- Tag releases for easy rollback
- Monitor sync status with alerts
- Test changes in staging first
Troubleshooting
Sync failures:
argocd app get my-app
argocd app sync my-app --prune
Out of sync status:
argocd app diff my-app
argocd app sync my-app --force
Related Skills
k8s-manifest-generator- For creating manifestshelm-chart-scaffolding- For packaging applications
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/gitops-workflow-with-argocd-and-flux-msih95ae/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/gitops-workflow-with-argocd-and-flux-msih95ae' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/gitops-workflow-with-argocd-and-flux-msih95ae/download' --output '.skill-downloads/gitops-workflow-with-argocd-and-flux-msih95ae/SKILL.md.part' && mv '.skill-downloads/gitops-workflow-with-argocd-and-flux-msih95ae/SKILL.md.part' '.skill-downloads/gitops-workflow-with-argocd-and-flux-msih95ae/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/gitops-workflow-with-argocd-and-flux-msih95ae/SKILL.md' && test -s '.skill-downloads/gitops-workflow-with-argocd-and-flux-msih95ae/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/gitops-workflow' && cp -R '.skill-downloads/gitops-workflow-with-argocd-and-flux-msih95ae' '.claude/skills/gitops-workflow'Cursor
test -f '.skill-downloads/gitops-workflow-with-argocd-and-flux-msih95ae/SKILL.md' && test -s '.skill-downloads/gitops-workflow-with-argocd-and-flux-msih95ae/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/gitops-workflow' && cp -R '.skill-downloads/gitops-workflow-with-argocd-and-flux-msih95ae' '.cursor/skills/gitops-workflow'Codex
test -f '.skill-downloads/gitops-workflow-with-argocd-and-flux-msih95ae/SKILL.md' && test -s '.skill-downloads/gitops-workflow-with-argocd-and-flux-msih95ae/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/gitops-workflow' && cp -R '.skill-downloads/gitops-workflow-with-argocd-and-flux-msih95ae' '.agents/skills/gitops-workflow'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/gitops-workflow-with-argocd-and-flux-msih95ae'openskills read 'gitops-workflow-with-argocd-and-flux-msih95ae'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/gitops-workflow-with-argocd-and-flux-msih95ae/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Configure a Chat Channel with SecretRefs
DevOps
Set up chat channels using non-interactive commands, with secrets only as SecretRefs. Covers gather, mutate, repair, and prove steps for reliable delivery.
Investigate ClickHouse CI Failures
DevOps
Investigate a ClickHouse CI failure end-to-end from a PR or S3 report URL. Fetches failed tests, classifies flaky vs real regression, and checks for existing issues/fixes.
Ansible PR Review
DevOps
Reviews an Ansible PR following the project's standardized process, including changelog checks, test coverage validation, and feedback tracking.