惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog RSS Feed
人人都是产品经理
人人都是产品经理
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google Online Security Blog
Google Online Security Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
The GitHub Blog
The GitHub Blog
N
News and Events Feed by Topic
Security Archives - TechRepublic
Security Archives - TechRepublic
D
DataBreaches.Net
阮一峰的网络日志
阮一峰的网络日志
H
Heimdal Security Blog
PCI Perspectives
PCI Perspectives
A
About on SuperTechFans
Forbes - Security
Forbes - Security
博客园 - 三生石上(FineUI控件)
博客园_首页
Vercel News
Vercel News
H
Hacker News: Front Page
WordPress大学
WordPress大学
Hacker News: Ask HN
Hacker News: Ask HN
MyScale Blog
MyScale Blog
Recent Announcements
Recent Announcements
N
News | PayPal Newsroom
T
Threatpost
Hacker News - Newest:
Hacker News - Newest: "LLM"
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
SecWiki News
SecWiki News
D
Docker
G
Google Developers Blog
L
LINUX DO - 最新话题
O
OpenAI News
S
Schneier on Security
AI
AI
T
The Exploit Database - CXSecurity.com
S
Security Affairs
I
Intezer
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Security Latest
Security Latest
博客园 - 司徒正美
Know Your Adversary
Know Your Adversary
爱范儿
爱范儿
T
Troy Hunt's Blog
L
LINUX DO - 热门话题

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
GitOps Deployment for Kubernetes Teams
Safdar Wahid · 2026-04-24 · via DEV Community

TLDR ;

  • GitOps uses Git as the single source of truth for infrastructure, enabling auditable and repeatable deployments
  • ArgoCD and Flux are the two leading GitOps tools, each suited to different team needs
  • Self-healing reconciliation automatically corrects configuration drift in production
  • European teams gain built-in audit trails that satisfy GDPR accountability requirements

Traditional CI/CD pushes changes to production through imperative scripts and manual kubectl commands. GitOps inverts this model. Instead of pushing changes, agents running inside your cluster pull desired state from Git and continuously reconcile actual state to match.

This approach provides three benefits that matter for production teams.

Benefit Description
Complete audit trail Git history records every infrastructure change, who made it, and why
Self-healing reconciliation Manual changes or drift get automatically corrected
Simple rollback Revert a Git commit to undo changes

According to the CNCF Annual Survey 2024, GitOps adoption has moved from experimental to mainstream, with 93% of organizations using or evaluating Kubernetes as the platform that makes GitOps practical. For European B2B organizations, the built-in audit trail supports GDPR's accountability principle and provides evidence for regulatory compliance reviews.

This article covers GitOps principles, practical implementation with ArgoCD and Flux, security best practices, and patterns for managing configuration across environments in production Kubernetes clusters.

GitOps Principles

[Developer] --> [Git Commit] --> [Git Repository]
                                       |
                              [GitOps Agent (Pull)]
                                       |
                              [Kubernetes Cluster]
                                       |
                              [Reconciliation Loop]

Enter fullscreen mode Exit fullscreen mode

Three principles define GitOps:

Principle Description Example
Declarative configuration Describe desired state, not steps to achieve it Commit replicas: 3 instead of kubectl scale
Git as single source of truth Everything about infrastructure lives in Git Manifests, Helm charts, Kustomize overlays, RBAC, network policies
Automated reconciliation Agents continuously compare actual to desired state ArgoCD checks for drift every 3 minutes by default

ArgoCD for GitOps

ArgoCD is a CNCF graduated project with a polished web UI, multi-cluster support, and active development. It is the most widely adopted GitOps tool.

Define an Application:

YAML

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: api-production
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://github.com/example/infra
    targetRevision: main
    path: apps/api
  destination:
    server: https://kubernetes.default.svc
    namespace: production
  syncPolicy:
    automated:
      prune: true
      selfHeal: true

Enter fullscreen mode Exit fullscreen mode

With selfHeal: true, ArgoCD reverts any manual changes made directly to the cluster. With prune: true, resources deleted from Git get deleted from the cluster.

ApplicationSets generate multiple similar applications automatically:

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: api-all-environments
spec:
  generators:
    - list:
        elements:
          - env: dev
          - env: staging
          - env: prod
  template:
    metadata:
      name: 'api-{{env}}'
    spec:
      source:
        path: 'apps/api/{{env}}'
      destination:
        namespace: '{{env}}'

Enter fullscreen mode Exit fullscreen mode

ArgoCD ApplicationSet: single definition generates dev, staging, prod applications. Reduces duplication across environments.

This creates three applications from a single definition, reducing configuration duplication across multiple environments.

Flux for Lightweight GitOps

Flux is a CNCF graduated project that takes a Kubernetes-native approach. It runs as a set of controllers with no separate UI or CLI beyond kubectl.

Image update automation watches your container registry and automatically commits manifest updates when new images appear:

apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImagePolicy
metadata:
  name: api-policy
spec:
  imageRepositoryRef:
    name: api
  policy:
    semver:
      range: '>=1.0.0'
---
apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageUpdateAutomation
metadata:
  name: api-auto
spec:
  sourceRef:
    kind: GitRepository
    name: infra
  git:
    commit:
      author:
        name: Flux Bot
        email: flux@example.com
  update:
    path: ./apps/api
    strategy: Setters

Enter fullscreen mode Exit fullscreen mode

According to Flux documentation, this closes the loop between CI building a new image and CD deploying it, without requiring manual manifest updates.

Choose ArgoCD when you want a rich UI, multi-cluster management from a single pane, and RBAC for deployment approvals. Choose Flux when you prefer Kubernetes-native controllers, lightweight operation, and namespace-scoped multi-tenancy. Both support Helm and Kustomize natively.

Managing Configuration with Helm and Kustomize

GitOps tools need structured configuration to manage. Two approaches work well.

Kustomize pattern: base common config + overlays for dev, staging, prod overrides. No duplication across environments.

Helm charts with environment-specific values files:

# values-prod.yaml
replicas: 5
resources:
  limits:
    memory: 1Gi
image:
  repository: registry.example.com/api
  tag: v1.2.3

Enter fullscreen mode Exit fullscreen mode

Kustomize overlays with base-plus-patch structure:

apps/
  api/
    base/
      deployment.yaml
      service.yaml
    dev/
      kustomization.yaml
    staging/
      kustomization.yaml
    prod/
      kustomization.yaml

Enter fullscreen mode Exit fullscreen mode

Each environment overlays the base with environment-specific patches. According to the Kubernetes documentation, Kustomize is built into kubectl and requires no additional tooling. Use Helm for third-party charts from Artifact Hub and Kustomize for internal applications.


Helm or Kustomize? Both. We help you structure your repository.

Managing configuration across dev, staging, and prod is where GitOps gets complex.

We help you:

  • Structure your GitOps repository – Base + overlays pattern
  • Manage Helm charts at scale – Environment-specific values
  • Reduce duplication with ApplicationSets – One definition, many environments
  • Handle third-party charts – Prometheus, Ingress, Cert-Manager

Get Repository Structure Help →


Security in GitOps Workflows

GitOps improves security by default, but correct implementation matters.

Repository access control: GitOps agents need only read access to Git repositories. Write access is limited to developers through PR workflows. This separation means a compromised cluster cannot modify its own desired state.

Never commit secrets to Git. Use Sealed Secrets for encrypted secrets in Git, or External Secrets Operator to sync from cloud vaults:

apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: db-credentials
spec:
  secretStoreRef:
    name: aws-secrets-manager
  target:
    name: db-credentials
  data:
    - secretKey: password
      remoteRef:
        key: prod/database/password

Enter fullscreen mode Exit fullscreen mode

PR-based approval workflows provide audit trails. Every infrastructure change goes through code review before merging. For European organizations, this creates a documented approval chain that satisfies GDPR audit requirements and supports compliance frameworks like PSD2 and MiFID II.

External Secrets Operator syncs secrets from AWS Secrets Manager/Vault to Kubernetes. Secrets never touch Git.

Sync waves control deployment ordering when applications have dependencies:

metadata:
  annotations:
    argocd.argoproj.io/sync-wave: "1"  # Deploy database first
---
metadata:
  annotations:
    argocd.argoproj.io/sync-wave: "2"  # Then deploy application

Enter fullscreen mode Exit fullscreen mode

Combined with pipeline security controls, GitOps provides defense-in-depth for your deployment process. Every change is traceable, reviewable, and reversible.


Conclusion

GitOps transforms infrastructure management from imperative scripts to declarative, auditable, self-healing systems. Start with ArgoCD if you want a visual dashboard and multi-cluster management. Choose Flux if you prefer lightweight, Kubernetes-native controllers.

Structure your repository with base configurations and environment overlays using Kustomize or Helm. Combine GitOps with progressive delivery for safer rollouts and build system automation for consistent artifacts. Keep secrets out of Git using External Secrets Operator, and enforce PR reviews for all changes to your CI/CD pipeline configuration.


FAQs

What is the difference between ArgoCD and Flux?

ArgoCD provides a rich web UI, multi-cluster management, and RBAC for deployment approvals. Flux runs as Kubernetes controllers with no separate UI, favoring kubectl-based workflows. ArgoCD suits teams wanting visual oversight; Flux suits teams preferring lightweight, Kubernetes-native tooling. Both are CNCF graduated projects.

How do I handle rollbacks with GitOps?

  • Primary method: Revert the Git commit that introduced the change → agent detects reverted state and reconciles cluster
  • Immediate action (ArgoCD):argocd app rollback
  • Immediate action (Flux):flux reconcile
  • Works for both ArgoCD and Flux

Can GitOps work with non-Kubernetes infrastructure?

GitOps principles apply to any declarative infrastructure. Terraform with Git-based workflows follows GitOps patterns. However, ArgoCD and Flux are Kubernetes-specific. For non-Kubernetes resources, tools like Crossplane extend the GitOps model to cloud provider resources managed through Kubernetes CRDs.