supraj.dev

Interview questions & answers

ArgoCD

GitOps, ApplicationSets, sync strategies, and multi-cluster.

  • 14 questions
  • 2 easy
  • 7 medium
  • 5 hard

14 questions

Question 1Easy

What is ArgoCD and how does it implement GitOps?

#
Show answer

ArgoCD is a declarative GitOps CD tool for Kubernetes. It continuously monitors a Git repository and syncs the desired state defined in manifests (YAML, Helm, Kustomize) to the cluster. Git is the single source of truth — any drift between Git and the live cluster is detected and can be auto-corrected via Self-Heal. The core loop: watch Git → detect drift → sync to cluster → report status.

Question 2Easy

What is the difference between Automated and Manual sync policies?

#
Show answer

Automated sync: ArgoCD automatically syncs the cluster whenever Git changes are detected. Manual sync: an operator must click Sync or run argocd app sync. Automated sync can optionally enable Prune (delete resources removed from Git) and Self-Heal (revert manual cluster changes back to Git state). For production, use Automated with Prune and Self-Heal disabled initially, then enable gradually.

Question 3Medium

What are Sync Waves and Sync Hooks in ArgoCD?

#
Show answer

Sync Waves control resource ordering within a sync — resources with lower wave numbers (e.g., wave -5) apply first, higher waves (e.g., wave 10) apply last. Sync Hooks run Jobs at specific sync phases (PreSync, Sync, PostSync, Skip, SyncFail). Hooks are for db migrations, smoke tests, or pre-sync validation. Annotation: argocd.argoproj.io/sync-wave: "5" and argocd.argoproj.io/hook: PreSync. Hooks replace the deprecated Helm hook pattern.

Question 4Medium

How does ArgoCD handle multi-cluster deployments?

#
Show answer

ArgoCD can manage any number of external clusters. Register clusters via argocd cluster add <context> or declaratively in argocd-cm. Applications target specific clusters via spec.destination.server or spec.destination.name. For deploying the same app to many clusters, use an ApplicationSet with cluster generators: generators: - clusters: {selector: {matchLabels: {env: prod}}}. ApplicationSets create one Application per cluster automatically.

Question 5Medium

What is an ApplicationSet and what generators does it support?

#
Show answer

ApplicationSet is a template that generates multiple ArgoCD Applications from a single definition. Generators: List (hardcoded values), Cluster (all registered clusters matching labels), Git (directories or files in a repo), SCM Provider (GitHub/GitLab/Bitbucket org repos), Pull Request (auto-creates apps for PRs), Matrix (combine two generators), Merge (merge generator outputs). ApplicationSets are the standard way to manage multi-cluster and multi-service deployments at scale.

Question 6Hard

How does ArgoCD RBAC work and how do you configure it for multi-team access?

#
Show answer

RBAC is configured in argocd-rbac-cm ConfigMap. Policy format follows Casbin: p, role, resource, action, object. Example: p, team-leads, applications, sync, myproject/*, allow. Resources: applications, projects, clusters, repositories, logs, exec. Actions: get, create, update, delete, sync, override, action/* (for custom resource actions). Roles map to OIDC groups via argocd-cm: data: scopes: [groups, email]. For full isolation, create separate Projects per team — an ArgoCD Project restricts which clusters, namespaces, and Git sources an Application can use.

Question 7Hard

How do you manage secrets in ArgoCD without storing them in Git?

#
Show answer

Options: (1) SealedSecrets — encrypt secrets in Git, ArgoCD syncs them, the SealedSecrets controller decrypts. (2) External Secrets Operator (ESO) — store secret references in Git, ESO fetches from AWS/GCP/Vault. (3) Vault Agent Injector — inject via annotations at runtime. (4) argocd-vault-plugin — render secrets at sync time (plugin runs in ArgoCD repo server). (5) SOPS — encrypt secret values in Git, decrypt at sync via a SOPS plugin. Best practice: avoid storing even encrypted secrets in the GitOps repo if possible — use ESO or Vault for true secret-free GitOps.

Question 8Hard

How does ArgoCD's health assessment system work, and how do you write custom health checks?

#
Show answer

ArgoCD has built-in health checks for standard resources (Deployment, StatefulSet, Service, Ingress). For custom resources (CRDs), you write a Lua script in argocd-cm: resource.customizations: argoproj.io_Rollout: health.lua: | hs = {} if obj.status.currentStepIndex == obj.status.stepCount - 1 then hs.status = "Healthy" else hs.status = "Progressing" end return hs. Health statuses: Healthy, Progressing, Degraded, Suspended, Missing, Unknown. The health check is evaluated after every sync and determines the Application's overall health status in the UI.

Question 9Hard

How do you implement canary deployments with Argo Rollouts in an ArgoCD GitOps workflow?

#
Show answer

Argo Rollouts extends Kubernetes with BlueGreen and Canary rollout strategies. Declare a Rollout CRD (replaces Deployment) with strategy: canary: steps: [{setWeight: 20}, {pause: {duration: 60}}, {setWeight: 100}]. ArgoCD syncs the Rollout resource. The Rollout controller manages the actual traffic shift (via Service mesh or ingress). Analysis runs: analysis: templates: - templateName: success-rate. If the analysis fails, the Rollout auto-aborts. ArgoCD shows Rollout health as Progressing until fully promoted. This enables GitOps-driven progressive delivery without external CI triggers.

Question 10Medium

What is the argocd-image-updater and how does it automate image updates?

#
Show answer

argocd-image-updater watches container registries for new tags and automatically updates the Git repository (creating PRs or committing directly) to update image tags in manifests. Configured via annotations on the Application: argocd-image-updater.argoproj.io/image-list: myapp=nginx:1.25. Update strategies: semver (follows semantic versions), latest (track latest), digest (track digest), name (track by tag name pattern). This closes the loop: CI pushes image → image-updater detects new tag → updates Git → ArgoCD syncs → cluster updated.

Question 11MediumUpgrades

What would you check before upgrading Argo CD from 2.x to 3.x?

#

You run Argo CD 2.14 managing 300 Applications across five clusters.

Show answer

Argo CD 3.0 changed several defaults. Resource tracking moved from the instance label to the argocd.argoproj.io/tracking-id annotation, so check tools that relied on the label. The manifest now ships default resource.exclusions for controller-created resources, and repository configuration in argocd-cm is no longer supported, so repos must be Secrets.

ApplicationSet nested selectors are always applied, and some RBAC behaviour changed. Upgrade a non-production instance first, compare sync status and diffs before and after, and follow the guide's steps to keep 2.x behaviour where you need time.

Trade-offs

Keeping old defaults eases the upgrade but postpones migration work you will need later.

Common mistake

Upgrading straight to production and finding every Application OutOfSync because of the tracking change.

Follow-up

How would you migrate resource tracking without Argo CD pruning anything?

Question 12MediumDiffing

An Application is OutOfSync forever because a controller changes a field. How do you fix it properly?

#

An HPA changes spec.replicas and a webhook injects a sidecar annotation. Argo CD keeps flagging drift.

Show answer

If another controller owns the field, stop managing it in Git: remove replicas from the Deployment when an HPA scales it. For fields you must keep but that are mutated after apply, configure ignoreDifferences with JSON pointers, JQ expressions or managedFieldsManagers to ignore changes made by a specific manager.

Add the RespectIgnoreDifferences=true sync option if syncs should also leave those fields alone. Keep the ignore rules narrow, so real drift in the same resource still shows.

Trade-offs

Broad ignore rules end the noise but can hide drift you actually care about.

Common mistake

Turning off self-heal to stop the flapping, which also stops real drift correction.

Follow-up

How would you ignore one injected annotation without ignoring all annotations?

Question 13MediumPromotion

How do you promote a release from dev to production with GitOps without copying YAML by hand?

#

Engineers edit image tags in three environment folders, and production sometimes gets a tag that never ran in staging.

Show answer

Build the image once and refer to it by digest. Keep a base configuration plus a small overlay per environment, so promotion means changing one value, the image reference, in the next environment's overlay through a pull request.

Automate the first step: Argo CD Image Updater or your CI can update the dev overlay when a new image appears. Promote to staging and production with automated pull requests that carry the exact digest already running in the previous environment, gated by its health and tests. The Git history then shows what ran where and when.

Trade-offs

Pull-request-based promotion is auditable but slower than pushing directly; automate the PRs, not the approval.

Common mistake

Rebuilding the image per environment, so production runs something staging never tested.

Follow-up

How would you roll back production by reverting Git without affecting other environments?

Question 14HardPerformance

Argo CD takes twenty minutes to notice and sync changes for 800 Applications. Where do you look?

#

All Applications live in one monorepo. Every commit makes Argo CD refresh everything.

Show answer

Change detection: replace polling with Git webhooks, and in a monorepo add the argocd.argoproj.io/manifest-generate-paths annotation so a commit refreshes only Applications whose paths changed. Manifest generation: the repo server renders Helm and Kustomize for every refresh; scale its replicas, watch its queue and cache, and avoid heavy plugins.

Reconciliation: shard the application controller across replicas, tune its processing settings, and check API server latency to the managed clusters. Measure each stage with Argo CD's metrics before changing settings.

Trade-offs

More replicas and shards speed things up but add resource use; targeted refreshes are the cheapest win.

Common mistake

Shortening the reconcile interval, which adds load without fixing the bottleneck.

Follow-up

Which Argo CD metrics would show whether the repo server or the controller is the bottleneck?