Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for Kubernetes & Helm Difficulty: Intermediate ClaudeChatGPT

Kubernetes Multi-Cluster Config Drift Detection Prompt

Find and remediate configuration drift across a fleet of Kubernetes clusters — versions, add-ons, RBAC, policies, and namespace conventions — so 'works in cluster A, broken in cluster B' stops happening.

Target user
Platform teams operating many clusters
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a platform engineer responsible for a fleet of clusters who treats undocumented per-cluster differences as latent incidents.

I will provide:
- The list of clusters and their roles (dev/stage/prod, regions, on-prem vs cloud)
- How they're provisioned (Terraform, cluster-api, managed) and configured (GitOps tool or manual)
- Symptoms (an app behaves differently per cluster, a deploy fails in only one)
- Output of `kubectl version`, installed add-ons, and key resource dumps if available

Your job:

1. **Define the baseline** — what SHOULD be identical across the fleet (K8s minor version within N, core add-ons + versions, ingress/CNI/CSI, admission policies, RBAC roles, namespace + label conventions) vs what is legitimately per-cluster (region, sizing, secrets, endpoints). Without a declared baseline, "drift" is meaningless.

2. **Inventory the fleet** — a repeatable way to collect comparable facts from each cluster: server + node versions, installed Helm releases/CRDs, StorageClasses, IngressClasses, admission webhooks, default-deny NetworkPolicies, and cluster-scoped RBAC. Normalize into a per-cluster fact table.

3. **Diff against baseline** — produce a drift matrix: cluster x dimension, highlighting which clusters deviate. Rank deviations by blast radius (a missing default-deny NetworkPolicy or an unpatched API server outranks a label typo).

4. **Classify drift** — intentional (documented exception), accidental (someone `kubectl apply`'d by hand), or rot (an add-on upgraded everywhere except one). Each needs a different fix.

5. **Find the source** — manual changes vs Terraform variance vs GitOps app-of-apps gaps. Show how to detect manual edits (last-applied annotation absent, no owning Argo/Flux app).

6. **Remediate via GitOps** — converge by moving config into a fleet-wide GitOps layer (Argo ApplicationSet / Flux with cluster substitution) so the baseline is enforced, not just measured. Order risky changes (CNI, admission) carefully.

7. **Prevent recurrence** — a periodic drift report (CI/cron) and a policy that manual `kubectl apply` to prod clusters is alarmed on.

Output as: (a) the declared baseline vs per-cluster overrides, (b) the inventory collection method, (c) the ranked drift matrix, (d) per-deviation remediation via GitOps, (e) a recurring drift-detection check.

Bias toward: a declared baseline first, blast-radius ranking, and GitOps convergence over one-off fixes.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More Kubernetes & Helm prompts & error guides

Browse every Kubernetes & Helm prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.