agentleFS
abevzabevz/devops-skills/skills/kubernetes-yaml-review/SKILL.md

kubernetes-yaml-review

Skill0 starsChanged 42 days agoMITView on GitHub

Use when reviewing raw or rendered Kubernetes manifests before apply, including Deployments, Services, Helm output, and Kustomize output. Mention "review this manifest", "review this YAML", or "k8s manifest review"; use helm-review for chart templates/values and pr-review for a diff with no manifest focus.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read raw or rendered YAML, including referenced Services, Secrets, RBAC, PDBs, and HPAs.

    line 18
  2. Distinctive:

    Do not review only the template when rendered output is the artifact being deployed.

    line 22
  3. Distinctive:

    Follow the Workflow, Safety rules, and Quality checklist below.

    line 26
  4. Distinctive:

    Use when reviewing raw or rendered Kubernetes manifests before they're committed or applied — Deployments, StatefulSets, Services, Ingress, …

    line 37
  5. Very specific:

    Use helm-review instead for chart templates, values, or upgrade behavior and pr-review for a diff without a specific manifest focus.

    line 39
  6. Distinctive:

    Check each manifest against:

    line 49
  7. Distinctive:

    Do not assume an unreviewed dependency (CRD, admission policy) is absent.

    line 96

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Kubernetes YAML Review

TL;DR checklist

  • Identify the workload type and deployment context.
  • Check selectors, probes, resources, security context, RBAC, and rollout safety.
  • Report concrete manifest risks before apply.

Key read-only checks

  • Read raw or rendered YAML, including referenced Services, Secrets, RBAC, PDBs, and HPAs.

Common pitfalls

  • Do not review only the template when rendered output is the artifact being deployed.

Agent procedure

Follow the Workflow, Safety rules, and Quality checklist below.

Quick references

  • references/reliability.md
  • references/examples.md

Last verified: unverified

When to use

Use when reviewing raw or rendered Kubernetes manifests before they're committed or applied — Deployments, StatefulSets, Services, Ingress, RBAC, etc. Use helm-review instead for chart templates, values, or upgrade behavior and pr-review for a diff without a specific manifest focus.

Goal

Catch manifest-level mistakes that cause outages, security gaps, or failed upgrades, before they reach a cluster.

Workflow

Check each manifest against:

  1. Labels/selectors — do selectors match template labels exactly? Will a label change orphan existing pods or break a rolling update?
  2. Probes — readiness and liveness probes present, pointing at something that reflects real health, with sane initialDelaySeconds/timeoutSeconds (liveness probes too aggressive can cause restart storms).
  3. Resources — requests and limits set for CPU/memory; flag missing requests (breaks scheduling/QoS) and limits set far above requests without justification.
  4. securityContext — runAsNonRoot, dropped capabilities, readOnlyRootFilesystem, allowPrivilegeEscalation: false, no privileged: true unless justified.
  5. serviceAccount/RBAC — is a dedicated ServiceAccount used, or the default one? Does the bound Role/ClusterRole grant more than needed (wildcards, cluster-admin)?
  6. PodDisruptionBudget — present for anything expected to stay available during voluntary disruptions (node drains, upgrades)?
  7. HPA — if autoscaling is expected, is an HPA defined with sane min/max and target metric?
  8. Affinity/anti-affinity — are replicas spread across nodes/zones, or can they all land on one node?
  9. Image tags — no :latest or floating tags in anything meant for production; pinned digest or version preferred.
  10. Config/secrets — are secrets referenced via Secret/external-secrets rather than hardcoded in the manifest or env var literals?
  11. Namespace assumptions — does the manifest hardcode a namespace that won't match every environment, or rely on kubectl context defaults?
  12. Upgrade safety — rolling update strategy (maxUnavailable/maxSurge) appropriate for the workload; StatefulSet update strategy considered if ordering matters.

References

  • references/reliability.md — deep-dive on probes (liveness vs readiness vs startup, the cascading-restart rule), graceful shutdown/preStop, rollout strategy arithmetic, QoS classes, the CPU-limit throttling question, cross-resource checks (HPA↔PDB), and read-only verification one-liners.
  • references/examples.md — bad → good manifest pairs for the most common findings; use them to recognize patterns and to show the user what the fix looks like.
  • references/workload-patterns.md — choosing the right workload kind, StatefulSet/Job/CronJob/ DaemonSet-specific review points, StorageClass and PVC pitfalls, and API deprecation/drift tables with validation one-liners.
  • references/tools.md — optional local static-analysis tools (kubeconform, kube-score, kube-linter, polaris, pluto, yamllint) that can supplement this manual review. Never install these automatically; only suggest running ones the user confirms are already available.

Safety rules

  • This is a review skill: do not run kubectl apply or helm install on the manifests reviewed.
  • Flag missing security defaults even if they're "probably fine in this cluster" — call out the gap and let the user decide.
  • Do not assume an unreviewed dependency (CRD, admission policy) is absent; say when you can't verify something without cluster access.

Output format

## Critical (will break or is unsafe as-is)
## Major (works but risky)
## Minor / style
## Not applicable / already good

Quality checklist

  • Selector/label match was checked, not assumed
  • securityContext and RBAC were checked on every workload, not just the first
  • Image tags were checked for :latest or floating tags
  • PDB/HPA presence was checked against the workload's actual availability needs
  • No manifest was applied to a cluster

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.