You've learned ArgoCD architecture, ApplicationSets, secrets management, and multi-cluster patterns manually. You can write manifests, reason about sync strategies, and debug deployment issues. Now you're ready for the next layer: using AI as a collaborator to generate sophisticated GitOps configurations that would take hours to write by hand.
This chapter teaches a critical skill: evaluating and refining AI-generated manifests. Claude can generate working ArgoCD configurations in seconds, but that output needs your domain knowledge to become production-ready.
GitOps configurations are highly structured YAML where small mistakes have large consequences. A typo in a sync policy, a missing imagePullSecret, or incorrect resource ordering can break deployments.
AI excels at:
But AI has no visibility into:
This is where you come in. You provide constraints, validate assumptions, and catch environment-specific mistakes that AI can't know about.
Ask yourself these questions:
Use AI if:
Don't rely on AI if:
When Claude generates a manifest, you are not accepting it as gospel. You're evaluating it against your environment.
Here's what Claude might generate for a multi-environment deployment:
Problems to identify:
This is where you step in. You know these constraints. Claude doesn't.
The collaborative process works like this:
You ask Claude to generate the manifest. You get a structurally correct starting point that's missing your environment-specific details.
You respond with your actual constraints:
"The cluster setup is different. We have:
- Dev cluster: minikube (local)
- Staging: 'staging-eks' (AWS EKS)
- Prod: 'prod-eks' (AWS EKS, requires IAM auth)
Dev can use public registries (docker.io), but staging and prod MUST use private ECR. The ECR URIs are: 123456789.dkr.ecr.us-east-1.amazonaws.com
All clusters have imagePullSecrets named 'ecr-credentials' except dev (which doesn't need one).
Auto-sync is okay for dev and staging, but prod MUST be manual sync only."
Claude doesn't know these constraints. But once you tell it, it can adapt immediately.
Claude regenerates the manifest accounting for your constraints:
Output: The manifest now uses your actual cluster servers, applies imagePullSecrets only where needed, makes auto-sync conditional, specifies the correct registry for each environment, and uses a specific image tag (sha-abc1234) instead of latest.
The collaborative process doesn't stop there. As Claude generates output, you ask clarifying questions:
Your question after seeing the refined manifest:
"The pull secret conditional syntax looks like Kustomize, not Helm. ArgoCD uses standard Helm templating. How would you rewrite the imagePullSecrets to work with ArgoCD's Helm integration?"
Claude explains and corrects:
Then you validate the fix by checking if it matches your Helm chart expectations.
You push back when Claude makes assumptions:
"You suggest using default StorageClass for all environments. But dev uses emptyDir, staging uses ebs-gp3, and prod uses ebs-io2 (expensive, high-performance). How do you handle per-environment storage class selection?"
Claude offers solutions:
Claude can generate manifests, but you must validate them before applying:
Each step confirms that Claude's generated manifest actually works in your environment.
Now practice this collaborative pattern yourself.
Ask Claude to generate an ApplicationSet:
Review Claude's output. Ask yourself:
Tell Claude your actual constraints:
After Claude regenerates, ask a clarifying question about an assumption:
Apply the final manifest and validate that Applications are generated and replicas match expectations across environments.
You built a gitops-deployment skill in Chapter 0. Test and improve it based on what you learned.
Ask yourself:
If you found gaps: