IaC Review — Kubernetes / Flux Manifests
Perform a static, pre-merge review of Kubernetes and Flux manifests in a GitOps repo. You catch issues before they reach the cluster; popeyescan catches what slipped through at runtime.
Use this skill when
- Reviewing a PR that changes
*.yaml manifests, Flux Kustomizations, Helm values, or install scripts
- Auditing an existing namespace for manifest-level issues (probes, resources, security, consistency)
- You need a structured /10 score before merging infra changes
Do not use this skill when
- The task is auditing a running cluster → use
popeyescan
- The task is app code (Python/React/NestJS) → use
code-reviewer
- The task is implementing new manifests → use the
k3s-devops agent
Review dimensions (6)
- Correctness — valid YAML, valid API versions (no deprecated
extensions/v1beta1), Flux Kustomization path matches actual directory, resource names match selectors, ports match services
- Security — secrets via ExternalSecrets (never in Git), NetworkPolicies on exposed workloads, oauth2-proxy on public ingresses, no privileged containers,
runAsUser/runAsGroup set, readOnlyRootFilesystem where possible, no hostPath/hostNetwork, image tags pinned (not latest)
- Reliability — probes (startup + liveness + readiness) on every Deployment, resources (requests + limits) on every container,
revisionHistoryLimit, PodDisruptionBudget for multi-replica, strategy appropriate (RollingUpdate for stateless, Recreate/StatefulSet for stateful)
- Consistency — same patterns across namespaces (probes everywhere or nowhere; resources everywhere or nowhere; labeling conventions like
app.kubernetes.io/part-of), same probe shape, same image pull policy, same ingress annotation set
- GitOps hygiene — Kustomization
path matches directory, prune: true for app namespaces, interval/timeout sensible, sourceRef correct, dependency order respected (cluster infra before secrets before apps), targetNamespace set
- Maintainability — no duplicated manifests (shared via Kustomize base/overlay when 3+ namespaces repeat the same shape), values externalized to
config/<env>/<service>/values.yaml, no inline secrets, comments explain non-obvious choices
Workflow
- Scope — run
git diff --name-only (or list the changed .yaml/.yml/.sh files). Read each changed file.
- Classify — note the resource kind(s) and whether the file is a Flux CR (GitRepository, Kustomization, HelmRelease) or a raw K8s manifest.
- Kubernetes checks — load
references/kubernetes-checklist.md and apply per resource kind (Deployment, StatefulSet, Service, Ingress, NetworkPolicy, ExternalSecret, ConfigMap, PVC).
- Flux checks — load
references/flux-checklist.md and apply to GitRepository/Kustomization/HelmRelease.
- Score — load
references/flux-rubric.md and score each dimension 1–10, then decide the overall /10 holistically (no fixed weights — you weight by context: a security-critical ingress weights security higher; a reliability-focused change weights probes/resources higher).
- Output — use the same Score table format as
code-reviewer (dimension | score | one-line justification), then Critical/Improvements/Minor/Positive sections.
Output Format
Score
| Dimension |
Score |
One-line justification |
| Correctness |
x/10 |
… |
| Security |
x/10 |
… |
| Reliability |
x/10 |
… |
| Consistency |
x/10 |
… |
| GitOps hygiene |
x/10 |
… |
| Maintainability |
x/10 |
… |
Overall: X/10 — (one sentence)
Verdict: approve / approve with minor comments / request changes / block. A 0–3 in Security or Correctness usually caps the overall at 5.
Critical Issues 🔴
Improvements 🟡
Minor Suggestions 🟢
Positive Highlights ✅
Stack context (flux repo)
The flux repo uses: K3s + Flux CD, Traefik ingress, ExternalSecrets → OpenBao, oauth2-proxy + Logto auth, OpenObserve observability, MinIO storage, Cloudflare tunnels. Manifests live under prd/<namespace>/<service>/; Flux config under config/<env>/. See references/flux-checklist.md for the repo-specific conventions.
References
references/flux-rubric.md — per-dimension scoring descriptors (0/5/8/10 anchors)
references/kubernetes-checklist.md — concrete checks per K8s resource kind
references/flux-checklist.md — Flux CR checks + repo-specific conventions
1---2name: iac-review3description: Static review of Kubernetes/Flux manifests in a GitOps repo (K3s + Flux CD). Scores manifests on 10 across correctness, security, reliability, consistency, GitOps hygiene, and maintainability. Use when reviewing PRs that change deployments, services, ingresses, network policies, external secrets, Flux Kustomizations, Helm values, or any K8s manifest — before it reaches the cluster. Complements popeyescan (runtime audit).4---56# IaC Review — Kubernetes / Flux Manifests78Perform a static, pre-merge review of Kubernetes and Flux manifests in a GitOps repo. You catch issues before they reach the cluster; `popeyescan` catches what slipped through at runtime.910## Use this skill when11- Reviewing a PR that changes `*.yaml` manifests, Flux Kustomizations, Helm values, or install scripts12- Auditing an existing namespace for manifest-level issues (probes, resources, security, consistency)13- You need a structured /10 score before merging infra changes1415## Do not use this skill when16- The task is auditing a **running** cluster → use `popeyescan`17- The task is app code (Python/React/NestJS) → use `code-reviewer`18- The task is implementing new manifests → use the `k3s-devops` agent1920## Review dimensions (6)211. **Correctness** — valid YAML, valid API versions (no deprecated `extensions/v1beta1`), Flux Kustomization `path` matches actual directory, resource names match selectors, ports match services222. **Security** — secrets via ExternalSecrets (never in Git), NetworkPolicies on exposed workloads, oauth2-proxy on public ingresses, no privileged containers, `runAsUser`/`runAsGroup` set, `readOnlyRootFilesystem` where possible, no `hostPath`/`hostNetwork`, image tags pinned (not `latest`)233. **Reliability** — probes (startup + liveness + readiness) on every Deployment, resources (requests + limits) on every container, `revisionHistoryLimit`, `PodDisruptionBudget` for multi-replica, `strategy` appropriate (RollingUpdate for stateless, Recreate/StatefulSet for stateful)244. **Consistency** — same patterns across namespaces (probes everywhere or nowhere; resources everywhere or nowhere; labeling conventions like `app.kubernetes.io/part-of`), same probe shape, same image pull policy, same ingress annotation set255. **GitOps hygiene** — Kustomization `path` matches directory, `prune: true` for app namespaces, `interval`/`timeout` sensible, `sourceRef` correct, dependency order respected (cluster infra before secrets before apps), `targetNamespace` set266. **Maintainability** — no duplicated manifests (shared via Kustomize base/overlay when 3+ namespaces repeat the same shape), values externalized to `config/<env>/<service>/values.yaml`, no inline secrets, comments explain non-obvious choices2728## Workflow291. **Scope** — run `git diff --name-only` (or list the changed `.yaml`/`.yml`/`.sh` files). Read each changed file.302. **Classify** — note the resource kind(s) and whether the file is a Flux CR (GitRepository, Kustomization, HelmRelease) or a raw K8s manifest.313. **Kubernetes checks** — load `references/kubernetes-checklist.md` and apply per resource kind (Deployment, StatefulSet, Service, Ingress, NetworkPolicy, ExternalSecret, ConfigMap, PVC).324. **Flux checks** — load `references/flux-checklist.md` and apply to GitRepository/Kustomization/HelmRelease.335. **Score** — load `references/flux-rubric.md` and score each dimension 1–10, then decide the overall /10 holistically (no fixed weights — you weight by context: a security-critical ingress weights security higher; a reliability-focused change weights probes/resources higher).346. **Output** — use the same Score table format as `code-reviewer` (dimension | score | one-line justification), then Critical/Improvements/Minor/Positive sections.3536## Output Format3738### Score3940| Dimension | Score | One-line justification |41|---|---|---|42| Correctness | x/10 | … |43| Security | x/10 | … |44| Reliability | x/10 | … |45| Consistency | x/10 | … |46| GitOps hygiene | x/10 | … |47| Maintainability | x/10 | … |4849**Overall: X/10 — <verdict>** (one sentence)5051Verdict: `approve` / `approve with minor comments` / `request changes` / `block`. A 0–3 in Security or Correctness usually caps the overall at 5.5253### Critical Issues 🔴54### Improvements 🟡55### Minor Suggestions 🟢56### Positive Highlights ✅5758## Stack context (flux repo)59The flux repo uses: K3s + Flux CD, Traefik ingress, ExternalSecrets → OpenBao, oauth2-proxy + Logto auth, OpenObserve observability, MinIO storage, Cloudflare tunnels. Manifests live under `prd/<namespace>/<service>/`; Flux config under `config/<env>/`. See `references/flux-checklist.md` for the repo-specific conventions.6061## References62- `references/flux-rubric.md` — per-dimension scoring descriptors (0/5/8/10 anchors)63- `references/kubernetes-checklist.md` — concrete checks per K8s resource kind64- `references/flux-checklist.md` — Flux CR checks + repo-specific conventions