GitOps: Declarative Deployments with ArgoCD and Flux

Compare Argo CD and Flux for Kubernetes GitOps, including reconciliation, dependency ordering, pruning safeguards, and secret references.

published: reading time: 23 min read author: Geek Workbench updated: November 17, 2026
Quick Summary

Argo CD and Flux reconcile Kubernetes resources from declared configuration, with different ways to model applications, dependencies, status, and operations. Automatic sync, drift correction, pruning, and rollback behavior depend on each controller's configuration. This guide compares their trade-offs and shows opt-in safety patterns for resource deletion and secret references.

Introduction

GitOps uses Git as a source for desired configuration that a controller reconciles against selected live resources. The controller does not capture runtime data or external state just because a resource is described in Git. For the general operating model and adoption trade-offs, see the GitOps concepts guide.

Core principles:

  1. Declarative description: Define desired configuration for resources in scope
  2. Versioned source: Store those declarations in Git and review changes there
  3. Reconciliation: A controller compares the source with live resources on its configured schedule or events
  4. Pull-based updates: A controller can retrieve changes without CI directly applying them to the cluster

Benefits:

  • Reviewable: Git can retain proposed configuration changes and review history
  • Reproducible configuration: Declared resources can be reapplied when their dependencies are available
  • Revision recovery: Reverting a Git change gives the controller a new desired revision to reconcile
  • Drift correction: Controllers can correct managed resources when automated sync or self-healing is configured
  • Developer-friendly: Standard git workflows for deployments

ArgoCD Architecture and Installation

Argo CD watches its configured sources and compares desired manifests with live resources. Detection and application follow the controller’s sync policy and reconciliation schedule; an observed difference does not always mean an automatic apply is enabled.

Architecture components:


Git Repository → ArgoCD → Kubernetes Cluster
     ↑              ↓
     ←←←←diff/sync←←←←

Installation:


# Namespace install
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

# Or with Helm
helm repo add argo https://argoproj.github.io/argo-helm
helm install argocd argo/argo-cd -n argocd --create-namespace

ArgoCD CLI:


# Install CLI
brew install argocd

# Login (get initial password)
argocd login --insecure --username admin --password $(kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-server -o jsonpath='{.items[0].spec.containers[0].env[?(@.name=="ARGOCD_AUTH_SECRET")].value}') localhost:8080

# Add repo
argocd repo add https://github.com/myorg/manifests --username myuser --password mytoken

# Sync application
argocd app sync myapp

ArgoCD server access:

# ingress.yaml for external access
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: argocd-server-ingress
  namespace: argocd
  annotations:
    nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
    nginx.ingress.kubernetes.io/ssl-passthrough: "true"
spec:
  ingressClassName: nginx
  rules:
    - host: argocd.mycorp.example.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: argocd-server
                port:
                  number: 443

Application and ApplicationSet Resources

ArgoCD defines applications that point to Git repositories containing Kubernetes manifests.

Basic Application:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: myapp
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://github.com/myorg/manifests.git
    targetRevision: HEAD
    path: apps/myapp/overlays/production
  destination:
    server: https://kubernetes.default.svc
    namespace: myapp
  syncPolicy:
    automated: {}

Helm-based Application:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: myapp
spec:
  source:
    repoURL: https://github.com/myorg/charts.git
    chart: myapp
    targetRevision: 1.2.0
    helm:
      valueFiles:
        - values-production.yaml
      parameters:
        - name: image.tag
          value: v2.1.0
      releaseName: myapp
  destination:
    server: https://kubernetes.default.svc
    namespace: myapp

ApplicationSet for GitOps automation across clusters:

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: myapp-multicluster
spec:
  generators:
    - git:
        repoURL: https://github.com/myorg/manifests.git
        revision: HEAD
        directories:
          - path: clusters/production/*
    - clusters:
        selector:
          matchLabels:
            environment: production

  template:
    metadata:
      name: myapp-{{name}}
    spec:
      project: default
      source:
        repoURL: https://github.com/myorg/manifests.git
        path: apps/myapp
        targetRevision: HEAD
      destination:
        server: "{{server}}"
        namespace: myapp
      syncPolicy:
        automated: {}

Flux Installation and Configuration

Flux uses a different operator model with GitRepository and Kustomization resources.

Installation with Flux CLI:


# Install Flux CLI
brew install fluxcd/tap/flux

# Bootstrap to cluster
flux bootstrap github \
  --owner=myorg \
  --repository=flux-infra \
  --branch=main \
  --path=./clusters/production \
  --personal

Core Flux resources:

# GitRepository defines the source
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
  name: myapp
  namespace: flux-system
spec:
  interval: 1m
  url: https://github.com/myorg/manifests.git
  ref:
    branch: main
  secretRef:
    name: git-credentials
  ignore: |
    # Ignore documentation in subfolders
    /**/*.md
# Kustomization defines what to apply
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
  name: myapp
  namespace: flux-system
spec:
  interval: 5m
  path: ./apps/myapp/overlays/production
  prune: false
  wait: true
  sourceRef:
    kind: GitRepository
    name: myapp
  targetNamespace: myapp
  healthChecks:
    - apiVersion: apps/v1
      kind: Deployment
      name: myapp
      namespace: myapp

Multi-environment with Flux:

# Production kustomization depends on staging
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
  name: myapp-staging
spec:
  dependsOn:
    - name: myapp-base
  # ...

---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
  name: myapp-production
spec:
  dependsOn:
    - name: myapp-staging # Wait for staging to be healthy
  # ...

Drift Detection and Correction

GitOps operators continuously monitor and correct drift.

ArgoCD drift detection:


# Check application health and sync status
argocd app get myapp

# Show diff between Git and cluster
argocd app diff myapp

# Manually sync after resolving drift
argocd app sync myapp

ArgoCD health assessment:

# Custom health check for custom resources
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: myapp
spec:
  ignoreDifferences:
    - group: apps
      kind: Deployment
      jsonPointers:
        - /spec/replicas # Ignore replica count differences

Flux drift handling:


# Suspend reconciliation
flux suspend kustomization myapp

# Resume reconciliation
flux resume kustomization myapp

# Force reconciliation
flux reconcile kustomization myapp --with-source

GitOps with Helm and Kustomize

Both tools work well with GitOps operators.

HelmRelease with ArgoCD:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: myapp
spec:
  source:
    chart: nginx
    repoURL: https://charts.bitnami.com/bitnami
    targetRevision: 15.0.0
    helm:
      releaseName: myapp
      values:
        replicaCount: 3
        service:
          type: LoadBalancer

HelmRelease with Flux:

apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: myapp
spec:
  interval: 1h
  chart:
    spec:
      chart: myapp
      version: 1.0.0
      sourceRef:
        kind: HelmRepository
        name: myorg-charts
  values:
    replicaCount: 3
  install:
    crds: Create
  upgrade:
    crds: CreateReplace

Kustomize with ArgoCD:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: myapp
spec:
  source:
    repoURL: https://github.com/myorg/manifests.git
    path: apps/myapp/overlays/production
    kustomize:
      commonLabels:
        app.kubernetes.io/managed-by: argocd
      images:
        - name: myapp
          newTag: v2.1.0

When to Use / When Not to Use

When GitOps makes sense

GitOps can help track configuration changes when the Git hosting service retains review records and the deployment process records which revision was applied. A commit alone does not prove that a deployment succeeded or that it is still running.

GitOps can help manage multiple clusters when each cluster’s source, overlays, and ownership are explicit. Reconciliation is asynchronous and depends on controller health, cluster access, and external resources; clusters do not necessarily converge at the same time or to identical runtime state.

Git can contribute to compliance evidence by recording intended configuration and review history. Pair it with deployment status, cluster audit logs, identity records, and retention controls required by your organization. A commit hash alone does not establish that production matches an approved configuration.

For a multi-cluster update, a controller can apply the same reviewed change to several clusters. Reconciliation delay and success depend on each cluster’s connectivity, controller health, policy, and dependencies. Monitor each destination rather than assuming one update reached the entire fleet.

For single-cluster teams, the calculus is tighter. GitOps adds an operator, credentials management, and a layer of abstraction over your Kubernetes manifests. If your pipeline already deploys cleanly and your team is small enough that everyone knows what is running, the overhead may not pay off. The moment you start involving multiple teams or multiple environments, GitOps starts making sense.

When to stick with CI-driven deployments

If your team is small and infrastructure changes infrequently, GitOps may add more operational work than it saves. The controller needs updates and monitoring, credentials need rotation, and its permissions need review. A CI pipeline with a documented promotion process may be enough for a small, stable environment.

GitOps can manage database configuration and related resources, but it does not manage the database’s application data. Keep data consistency, backups, and schema migrations in their own operational plans.

The honest case for CI-driven deployments: they are simpler to reason about when the deploy process is already working. You push code, CI runs tests, CI pushes a manifest, done. The mental model is linear and familiar. GitOps introduces operators, reconciliation loops, and the question of what happens when the operator disagrees with the cluster. For teams that are already productive with CI pipelines, switching is not a light decision.

What I see go wrong is teams adopting GitOps because it sounds sophisticated, then struggling with credential rotation, operator upgrades, and debugging why the cluster does not match Git. The operator is not magic — it is software that can break and that you need to monitor. If your infrastructure changes are infrequent enough that a CI pipeline with manual promotion gates works, stick with it.

GitOps Tool Selection Flow

Before choosing a controller, list the resources it will own, the interfaces operators need, the access boundaries, and the recovery behavior the team can support. Then test each candidate against one service and a representative dependency chain. A product name alone does not establish auditability or recovery time.

Argo CD and Flux have different resource models and status workflows. Choose based on the interfaces your team needs, how it will manage dependencies and multiple clusters, the controller operations it can support, and the exact behavior in the versions you plan to run. Feature details and setup are version-sensitive; check the linked project documentation before adopting a configuration.

Production Failure Scenarios

Common GitOps Failures

Failure Impact Mitigation
Git credentials expire Operator stops syncing, drift accumulates Use service accounts with token rotation
PR merged with bad YAML Broken manifests deployed to production Enable diff-before-sync, require reviews
Large manifest causes timeout Application stuck in progressing state Split into smaller Applications
Cluster unreachable Sync fails, ArgoCD/Flux marks app out-of-sync Configure retry intervals appropriately
drift detection too sensitive Constant re-syncing, wasting resources Configure ignoreDifferences in ArgoCD

Sync Failure Recovery Flow


flowchart TD
    A[Sync Triggered] --> B{Manifest Valid?}
    B -->|Invalid YAML| C[Sync Blocked]
    B -->|Valid| D{Resources Healthy?}
    D -->|No| E[Mark Degraded]
    D -->|Yes| F[Sync Complete]
    C --> G[Check Git commit]
    E --> H[Alert Team]
    F --> I[Monitor for Drift]
    G --> H
    H --> J[Fix and Force Sync]

Reference Secrets Without Committing Values

Keep secret values in a secret manager or encrypted store. Git can hold a reference that a separate controller resolves into a Kubernetes Secret. For example, External Secrets Operator can sync a remote field into a named Secret; configure the referenced store, identity, namespace permissions, and refresh behavior for your provider.

apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
  name: database-credentials
  namespace: payments
spec:
  refreshInterval: 1h
  secretStoreRef:
    name: production-secrets
    kind: ClusterSecretStore
  target:
    name: database-credentials
  data:
    - secretKey: username
      remoteRef:
        key: production/payments/database
        property: username

This manifest contains a remote path and field name, not a credential. Protect access to the secret store and to the generated Kubernetes Secret, and test what happens when the store is unavailable or the value rotates. The External Secrets Operator API reference documents the resource fields; the Flux secrets guide describes Flux-specific options. Argo CD can reconcile this manifest as an ordinary Kubernetes resource when the ESO controller is installed.

Observability Hooks

Track GitOps health through sync status, drift metrics, and reconciliation times.

What to monitor:

  • Sync status per application (OutOfSync, Synced, Degraded)
  • Time since last successful sync
  • Reconciliation duration (Flux) or sync duration (ArgoCD)
  • Drift count across all managed resources
  • Failed sync attempts and error messages

# ArgoCD - check sync status
argocd app get myapp --watch

# ArgoCD - list out-of-sync apps
argocd app list -o wide | grep OutOfSync

# Flux - check reconciliation status
flux get kustomizations

# Flux - check reconciliation logs
flux logs --kind=Kustomization --name=myapp

# Prometheus metrics from ArgoCD
argocd_app_sync_total{app_name="myapp", phase="success"}
argocd_app_sync_total{app_name="myapp", phase="failure"}
argocd_app_metadata{sync_token="abcd123"} # tracks commit SHA

Common Pitfalls / Anti-Patterns

Keep Secret Values Out of Git

Do not commit plaintext credentials, even to a private repository. Repositories can be cloned to developer machines and CI workers, and access may change over time. Use encrypted manifests or references to a separate secret store, then limit who can read the source values and generated Kubernetes Secrets.

If a credential is exposed, revoke or rotate it first, assess where it was used, and review provider access logs. History cleanup can remove the value from repository refs, but it does not invalidate the credential or erase copies in clones, caches, artifacts, and logs. Follow the incident response process for your provider and organization.

Choose Sync Policy Deliberately

Automated sync can reduce manual deployment steps, while manual sync can fit teams that require a review or promotion gate before applying a revision. Neither policy is universally safer: define who approves the desired change, when it may be applied, and how drift is surfaced.

There is no shared three-minute default. Flux Kustomizations require a configured interval, while Argo CD uses its own reconciliation settings; both may react to events or webhooks as configured. The time until resources change also depends on source availability, controller health, apply errors, and workload readiness. See the Argo CD automated sync documentation and Flux Kustomization reference for current behavior.

When temporarily pausing or changing reconciliation, use the controller’s documented procedure and record who is responsible for resuming it. A paused controller stops correcting drift until it is resumed.

Overly broad prune policies

Pruning deletes resources that were previously applied from a source but no longer appear in it. Treat it as a deletion policy, scope the source path and permissions, and enable it only after reviewing which resources the controller owns. Argo CD automated pruning is opt-in; Flux requires each Kustomization’s spec.prune setting.

A concrete example: say your Git repository root contains an apps/ directory and your team owns everything under apps/frontend/. Your Kustomization or Application spec.source.path is set to apps/frontend/. Another team owns apps/backend/, and their Application points to their own path. If your prune policy is set at the cluster level or your path is misconfigured to apps/ instead of apps/frontend/, removing a resource from apps/backend/ in Git causes the operator to issue a delete for that backend resource—even though it belongs to a different team and a different Application. The result is a production incident where the backend team’s deployment disappears while the frontend team is blissfully unaware they triggered it.

If a source path is broader than intended, the controller may delete every managed resource missing from that path, including resources the team expected to keep. Check ownership and rendered resources in a non-production environment before enabling pruning.

Protect an individual resource when it must survive removal from the source. Argo CD supports the Prune=false sync option on a resource. Flux supports a prune: disabled annotation for a resource managed by a Kustomization. These controls protect only the annotated resource; they do not replace reviewing the Kustomization or Application scope.

# Argo CD: do not prune this resource when it disappears from Git
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: database-data
  namespace: payments
  annotations:
    argocd.argoproj.io/sync-options: Prune=false
---
# Flux: protect an individual managed resource from garbage collection
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: database-data
  namespace: payments
  annotations:
    kustomize.toolkit.fluxcd.io/prune: disabled

Read the current Argo CD sync options and Flux Kustomization pruning documentation before using these options. A resource protection annotation is not a backup; take application-consistent backups for persistent data.

Order Resources with Dependencies

Do not assume resources apply in dependency order or that retries will resolve a missing dependency immediately. Argo CD can use sync waves and health checks; Flux Kustomizations can declare dependsOn relationships and readiness checks. These settings affect sequencing, but external services and resources outside the controller’s scope can still be unavailable. Define the dependency in the tool, check its readiness condition, and set timeouts and retry behavior for the workload.

Argo CD documents sync waves and resource health. Flux documents dependsOn and health checks. Review the version you run because details can change.

Using the same repository for everything

Monorepos with thousands of applications create performance problems. The operator scans the entire repo on every change. Split by team or by deployment boundary to keep sync times reasonable.

A GitOps monorepo with 5,000 files means every git push triggers the operator to re-evaluate all 5,000 manifests. With ArgoCD, the Application controller diffs every managed resource against live cluster state on each reconciliation cycle. If your spec.source.repoURL points to the root of a massive repo, sync latency climbs and controller CPU follows.

The two practical options are repository-per-team or repository-per-application-family. The repository-per-team model gives each team their own repo containing all the applications they own. Repository-per-application gives each application its own repo and Application resource. Both keep the operator’s workload manageable. If you must use a monorepo, use ArgoCD’s spec.source.path to limit scanning to a subdirectory, and consider enabling spec.syncPolicy.automated only for the Applications that need it.

Choosing Between Argo CD and Flux

Need to evaluate Argo CD Flux
Application model Application and ApplicationSet resources Composable source and toolkit resources
Status and operations Web UI, CLI, API, and controller status Kubernetes resource status and CLI; dashboards can be added
Dependency ordering Sync waves, hooks, and configured health checks Kustomization dependencies and configured health checks
Deletion behavior Automated prune is opt-in; per-resource options exist Kustomization requires a prune setting; per-resource options exist
Best next step Try it with a representative application Try it with a representative Kustomization

These are selection prompts, not ratings. Compare the exact release, operating model, permissions, and failure behavior you plan to run. See the current Argo CD documentation and Flux documentation before adopting a feature.

Interview Questions

1. What are the four GitOps principles?

Expected answer points:

  • Declarative description: store the intended configuration for selected resources
  • Versioned source: review changes in Git before they become desired state
  • Reconciliation: a controller compares desired configuration with resources in its scope
  • Automation is policy-driven and asynchronous; manual promotion can be appropriate for some teams
2. How does ArgoCD detect and correct drift?

Expected answer points:

  • Argo CD compares the configured source and live resources on its reconciliation schedule
  • When drift is detected, the application is marked OutOfSync
  • Automated sync applies a new source revision; self-healing for live drift requires its own configuration
  • Use argocd app diff to manually inspect differences
  • Use argocd app sync to manually trigger synchronization
3. What is the difference between ArgoCD and Flux architecture?

Expected answer points:

  • ArgoCD: Runs as a Kubernetes controller with built-in web UI and Application resource model
  • Flux: Uses GitRepository and Kustomization CRDs with a reconciler pattern
  • ArgoCD provides a UI for non-technical users; Flux is more CLI-oriented
  • Flux offers more granular control through CRD-based operators
  • Both are pull-based GitOps operators
4. How do you handle secrets in GitOps?

Expected answer points:

  • Never commit plain-text secrets to Git under any circumstances
  • Use sealed-secrets to encrypt secrets before committing
  • Use External Secrets Operator with Vault or other secret managers
  • ClusterSecretStore and ExternalSecret are External Secrets Operator resources that a GitOps controller can reconcile
  • Sealed-secrets requires a certificate public key; decryption needs the private key on the cluster
5. What is an ArgoCD ApplicationSet and when would you use it?

Expected answer points:

  • ApplicationSet is a controller that generates multiple Application resources from a template
  • Use cases: managing the same application across multiple clusters, multiple teams, or multiple environments
  • Generators: Git directory generator, Cluster generator, Matrix generator, etc.
  • Scales GitOps to hundreds of applications without manual creation
6. How does Flux handle multi-environment deployments with dependencies?

Expected answer points:

  • Flux Kustomization resources support dependsOn for ordering
  • A Flux Kustomization can wait for declared dependencies to become ready before reconciling its resources
  • Use dependencies for resource ordering only when their readiness checks represent the requirement you need
  • External services and state still need separate health and recovery handling
7. What are the risks of automated prune policies in GitOps?

Expected answer points:

  • With pruning enabled, resources previously managed by a source may be deleted when removed from that source
  • On shared clusters with multiple teams, broad path patterns can accidentally delete other team's resources
  • Review the Application or Kustomization scope before enabling pruning
  • Protect individual resources with Argo CD's Prune=false option or Flux's prune: disabled annotation when appropriate
8. How do you recover from a failed sync in ArgoCD?

Expected answer points:

  • Check if the manifest has invalid YAML - sync gets blocked
  • Verify Git commit is valid and accessible
  • Use argocd app history to review past sync attempts
  • Inspect the failed resource, controller events, source revision, and permissions before retrying a sync
  • A force apply can recreate resources and may cause data loss; use it only after reviewing the resource and recovery plan
  • Check for resource health issues - mark Degraded if resources are unhealthy
  • Alert the team if manual intervention is needed
9. What is sync wave ordering in ArgoCD and why does it matter?

Expected answer points:

  • When deploying multiple applications with dependencies, order matters
  • Database might try to start before the PVC is created
  • Argo CD can use sync waves and health checks; Flux can use Kustomization dependencies and health checks
  • Configure and test these controls; do not assume controller defaults express your application's dependencies
  • External dependencies may still fail even when Kubernetes resource ordering is configured
10. Why is it bad practice to use the same repository for everything in GitOps?

Expected answer points:

  • Monorepos with thousands of applications create performance problems
  • The operator scans the entire repo on every change
  • Sync times become unreasonable as the repo grows
  • Split by team or by deployment boundary to keep sync times reasonable
  • Consider repository-per-team or repository-per-application patterns
11. How do you monitor GitOps health?

Expected answer points:

  • Track sync status per application: OutOfSync, Synced, Degraded
  • Monitor time since last successful sync
  • Track reconciliation/sync duration
  • Monitor drift count across managed resources
  • Track failed sync attempts and error messages
  • Prometheus metrics available from ArgoCD: argocd_app_sync_total
12. What is the difference between self-heal and automated sync in ArgoCD?

Expected answer points:

  • selfHeal: corrects drift caused by manual changes to the cluster (external modifications)
  • automated: automatically applies changes when Git state differs from cluster state (new commits)
  • Both work together - selfHeal handles drift correction, automated handles deployment updates
  • Disable selfHeal when you need to make temporary manual changes for debugging
13. How does Flux's GitRepository resource work?

Expected answer points:

  • GitRepository defines the source of truth - which Git repo, branch, and path to monitor
  • The spec.interval defines how often Flux checks for new commits
  • secretRef points to credentials for private repos
  • The ignore field allows excluding files from synchronization (e.g., documentation)
  • Kustomization resources reference GitRepository as their source
14. What happens when Git credentials expire in a GitOps setup?

Expected answer points:

  • Source authentication fails, so the controller cannot fetch new revisions
  • The cluster may continue running its existing resources, but those resources may no longer match the desired source
  • Monitor source and reconciliation conditions so failures are visible
  • Mitigation: use scoped identities, supported credential rotation, and alerting for source errors
  • Implement credential expiry monitoring and rotation automation
15. How do you implement GitOps for a multi-cluster setup with ArgoCD?

Expected answer points:

  • Use ArgoCD ApplicationSets with cluster generator for scale
  • ApplicationSet template generates Applications for each target cluster
  • Use labels on clusters to filter targets (e.g., environment: production)
  • Directory generator walks a clusters/ path in Git to discover cluster definitions
  • Central Hub Cluster pattern: one ArgoCD instance manages multiple remote clusters
16. What is the role of Kustomize in GitOps workflows?

Expected answer points:

  • Kustomize provides overlay-based configuration management
  • Base configurations + environment overlays (dev, staging, prod)
  • ArgoCD has native Kustomize support in Application spec
  • Flux uses Kustomization CRD which applies Kustomize overlays
  • Common labels and image tags can be patched across environments
17. How do you handle rollback in GitOps?

Expected answer points:

  • A reviewed Git revert creates a new desired revision; the controller must detect and apply it
  • Argo CD automated sync has restrictions on its rollback command; consult its current documentation before choosing a procedure
  • Flux reconciles from its configured source, so revert the source change when Git is authoritative
  • Rollback time and result depend on controller health, dependencies, and workload readiness
  • Reverting manifests does not reverse data changes or external side effects
18. What is the difference between ArgoCD and Flux in handling Helm charts?

Expected answer points:

  • ArgoCD: Has native Helm support with valueFiles and parameters in Application spec
  • Flux: Uses HelmRelease CRD which is a separate resource type
  • Flux HelmRelease has install and upgrade crds options (Create vs CreateReplace)
  • Both support Helm repos and chart versioning
  • ArgoCD can treat Helm output as manifests; Flux has explicit HelmRelease
19. Why might an ArgoCD application get stuck in progressing state?

Expected answer points:

  • Large manifest causes timeout - split into smaller Applications
  • Invalid YAML in manifests blocks sync
  • Resource dependencies not met (PVC not created before Pod)
  • Health check failing for custom resources
  • Misconfigured ignoreDifferences causing false drift detection
20. How do you secure ArgoCD server access in production?

Expected answer points:

  • Use Ingress with HTTPS and ssl-passthrough for ArgoCD server
  • Configure nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
  • Enable SSO/OIDC integration instead of local users
  • Use dex for external identity provider integration
  • Store credentials in Kubernetes secrets, not in Application manifests
  • Implement RBAC for namespace-level access control

Further Reading

Conclusion

Key Takeaways

  • Git can store the desired configuration for resources a controller manages; it is not a complete record of runtime state
  • Argo CD and Flux use different resource models and operating interfaces
  • Automated sync, self-healing, pruning, and retries depend on configuration
  • Keep secret values out of plaintext Git and define a rotation and recovery process
  • Reverting desired configuration is asynchronous and cannot reverse data changes or external side effects

GitOps Health Checklist


# Verify ArgoCD sync status
argocd app list

# Check Flux reconciliation
flux get all --namespace flux-system

# View sync history
argocd app history myapp

# Flux: reconcile with source refresh
flux reconcile kustomization myapp --with-source

# Check for drift
argocd app diff myapp

# Verify secrets are not in Git
git log --all --full-history -S "password" -- "*.yaml"

Category

Related Posts

GitOps: Infrastructure as Code with Git for Microservices

Learn the GitOps operating model, reconciliation loop, repository patterns, secret boundaries, and trade-offs for Kubernetes deployments.

#microservices #gitops #infrastructure-as-code

Kustomize for Kubernetes Configuration Management

Build and review Kubernetes overlays with Kustomize. Learn when to use bases, patches, and generators, and validate rendered manifests before applying them.

#kubernetes #kustomize #devops

Container Security: Image Scanning and Vulnerability Risks

Implement comprehensive container security: from scanning images for vulnerabilities to runtime security monitoring and secrets protection.

#container-security #docker #kubernetes