GitOps & ArgoCD Interview Questions for DevOps Engineers
GitOps is the standard for Kubernetes deployments. Can you architect an ArgoCD setup for a multi-cluster environment?
1. What is the core principle of GitOps?
The core principle is that Git is the single source of truth for declarative infrastructure and applications. Software agents automatically pull state from Git and reconcile it with the live environment.
2. What is the App of Apps pattern in ArgoCD?
You create one "Root Application" that points to a Git directory containing the YAML definitions of other ArgoCD Applications. This allows you to bootstrap an entire cluster from a single Git repository.
3. Push vs Pull based CI/CD?
Push: The CI pipeline builds the artifact and then runs scripts (e.g., \kubectl apply\) to push to the cluster. Requires giving CI tools cluster credentials.
Pull (GitOps): An agent inside the cluster watches Git and pulls changes. More secure, as the cluster credentials stay inside the cluster.
4. What is a reconciliation loop?
It is a continuous process where ArgoCD compares the desired state (in Git) with the live state (in Kubernetes). If there is a divergence, it attempts to synchronize the live state to match the desired state.
5. How do you handle secrets in GitOps?
Since you cannot store plain-text secrets in Git, you use tools like Sealed Secrets (encrypts secrets into a custom resource that only the cluster can decrypt) or External Secrets Operator (fetches secrets dynamically from AWS Secrets Manager/Vault).
6. What is Argo Rollouts?
Argo Rollouts is a Kubernetes controller that provides advanced deployment capabilities such as Blue-Green, Canary, and progressive delivery, which are not available in standard Kubernetes Deployments.
7. How does ArgoCD handle configuration management tools?
ArgoCD natively supports Kustomize, Helm, Ksonnet, and plain YAML manifests. It renders these templates dynamically into standard Kubernetes manifests before applying them.
8. What happens if someone manually edits a resource in the cluster?
ArgoCD detects this as an OutOfSync state. Depending on the Sync Policy, it will either just show a warning, or if Auto-Sync and Self-Heal are enabled, it will immediately overwrite the manual changes with the state from Git.
9. Explain ArgoCD Sync Phases.
Pre-Sync (e.g., database migrations), Sync (applying manifests), and Post-Sync (e.g., sending slack notifications). Hooks allow you to run tasks at different stages of the deployment.
10. How do you promote code between environments in GitOps?
Common patterns include using separate branches per environment (e.g., \dev\, \staging\, \prod\), or using a single branch with directory separation (e.g., Kustomize overlays for different environments).
11. What is the ApplicationSet controller?
It is an ArgoCD component used for managing multiple Applications across multiple clusters. It dynamically generates Applications based on a templated definition and a list of generators (like clusters, git directories, or pull requests).
12. How do you manage ArgoCD itself with GitOps?
You install the base ArgoCD components, and then immediately create an ArgoCD Application that points to the Git repository containing ArgoCD's own configuration. This makes ArgoCD manage itself.
13. How does ArgoCD integrate with SSO?
ArgoCD comes with a bundled Dex server, which can act as an OIDC identity provider proxy. This allows easy integration with GitHub, GitLab, Google, Okta, and SAML providers for RBAC.
14. What is Flux and how does it compare to ArgoCD?
Flux is another major GitOps tool. While ArgoCD has a rich UI and supports multiple applications naturally, Flux is historically more CLI-focused and modular, though both offer similar core GitOps capabilities.
15. How do you trigger ArgoCD syncs immediately?
By default, ArgoCD polls Git every 3 minutes. For immediate syncs, you can configure Webhooks in your Git provider (GitHub/GitLab) to notify ArgoCD the moment a commit is pushed.
16. What are Sync Waves in ArgoCD?
Sync Waves allow you to order the deployment of resources. For example, ensuring Namespaces and CRDs are deployed in Wave -1 before standard resources in Wave 0.
17. How do you rollback in GitOps?
The GitOps way to rollback is to \git revert\ the offending commit in the Git repository. ArgoCD will then detect the reverted state and synchronize the cluster back to the previous healthy state.
18. Can ArgoCD manage resources outside of Kubernetes?
Not natively. ArgoCD is specifically designed as a Kubernetes controller. However, you can manage cloud resources (AWS/GCP) using Crossplane or AWS Controllers for Kubernetes (ACK) managed by ArgoCD.
19. What is a GitOps image update automation?
Tools like ArgoCD Image Updater or Flux Image Update Automation monitor your container registry for new images, automatically update the image tags in your Git repository, and push the commit.
20. How do you test GitOps manifests before merging?
You use CI pipelines to run \kubeval\, \conftest\, or \kustomize build\ to validate the YAML manifests on Pull Requests, ensuring that only valid configurations are merged into the main branch.




