You've learned GitOps principles in Chapter 6. Now it's time to install the controller that enforces those principles: ArgoCD. ArgoCD is a declarative, GitOps continuous delivery tool that reconciles your Git repository with your Kubernetes cluster.
The journey is straightforward:
By the end of this chapter, you'll have a running ArgoCD instance that watches a Git repository and automatically syncs changes to your cluster.
Before ArgoCD, your deployment workflow was manual and fragile. With ArgoCD, it becomes declarative and automated.
Git becomes your source of truth. ArgoCD becomes the enforcement mechanism.
When you install ArgoCD, you get five components working together. Understanding each one helps you troubleshoot when something breaks.
What it does: Exposes the REST API that the UI and CLI communicate with
Port: 8080 (internal), exposed to 443 externally
Example interaction: When you click "Sync" in the UI, the UI sends a request to the API Server. The API Server validates the request and instructs the Application Controller to reconcile.
What it does: Clones your Git repository and generates Kubernetes manifests
Why separate: Cloning repositories and rendering templates is resource-intensive. Keeping it in a separate pod lets it scale independently.
Flow:
What it does: The reconciliation loop—compares Git state with cluster state and syncs when they differ
Core logic:
What it does: Cache for Git state and cluster state
Why it matters: Without caching, ArgoCD would fetch Git and query the cluster constantly. Redis stores intermediate data so reconciliation is fast.
What it does: OIDC provider for authentication (optional, but configured by default)
When you use it: When you integrate ArgoCD with GitHub, GitLab, or another OAuth provider for multi-user access
For now: You'll skip OAuth and just use the built-in admin user.
ArgoCD introduces three new Kubernetes resource types you'll use constantly:
Defines what to sync and where. Example:
What this means: "Watch the k8s/ directory in my GitHub repo. If anything changes, apply those manifests to my cluster. If the cluster drifts, fix it."
Defines access control and constraints. You'll use this in Chapter 11 (RBAC), but know it exists. For now, all applications use the default project.
Scales applications across multiple clusters or environments. You'll learn this in Chapter 10. For now, know that one Application = one repo + one cluster. ApplicationSet = one template applied to many clusters.
You'll install ArgoCD 3.x using Helm (from previous chapters). Make sure your Minikube cluster is running first.
Output:
Output:
Output:
Wait for all pods to be ready (this takes 30-60 seconds):
Output:
Press Ctrl+C when all pods show 1/1 Running.
Output:
Leave this running in a terminal tab.
In a new terminal:
Output:
Your actual password will be different.
Navigate to https://localhost:8080 in your browser.
What you'll see:
The browser will warn "This connection is not private" (because it's a self-signed certificate). Click "Advanced" and "Proceed to localhost:8080".
After logging in, you'll see:
The CLI lets you manage ArgoCD from the command line. You can sync applications, create new applications, and view status without opening the browser.
Output:
Output:
Or using Chocolatey:
Verify the installation:
Output:
You need to tell the CLI how to connect to your ArgoCD server.
Output:
The --insecure flag tells the CLI to skip certificate verification (safe for localhost).
Now test that the CLI works:
Output:
The output is empty (no applications yet), which is expected.
You now have a working ArgoCD instance. Let's verify all components are healthy.
Output:
All should show 1/1 ready and Running status.
Output:
The API Server is running if you see "Server started listening".
Output:
The controller is reconciling if you see the reconciliation loop message.
By completing this chapter, you have established a production-grade GitOps control plane.
In Chapter 8, you'll create your first Application resource that points to a GitHub repository. ArgoCD will watch that repository and sync changes to your cluster automatically.
Use AI to troubleshoot resource constraints and optimize your installation.
Prompt: "I'm trying to set up ArgoCD on my Minikube cluster, but the argocd-repo-server pod keeps crashing with 'OOMKilled'. My Minikube has 4GB of RAM. What should I do?"
Follow-up: "I see the repo-server pod requesting 1Gi of memory. Can I safely lower this to 512Mi if I'm only deploying small applications?"
Use the response to understand which components are resource-sensitive and when it's safe to optimize.
You built a gitops-deployment skill in Chapter 0. Test and improve it based on what you learned.
Ask yourself:
If you found gaps: