Kubernetes manifest review
Reviews Kubernetes manifests and Helm values for reliability and security: resources, probes, securityContext, image tags, PodDisruptionBudget, rollout strategy. Use when the user writes, edits or asks to review K8s YAML, a Helm chart or a deployment.
kubernetes-manifest-reviewInstall
Run one command — it saves SKILL.md into your agent's skills folder. Restart the agent and the skill is picked up automatically.
mkdir -p ~/.claude/skills/kubernetes-manifest-review && curl -fsSL https://anymodel.org/en/skills/devops/kubernetes-manifest-review/SKILL.md -o ~/.claude/skills/kubernetes-manifest-review/SKILL.md
mkdir -p ~/.agents/skills/kubernetes-manifest-review && curl -fsSL https://anymodel.org/en/skills/devops/kubernetes-manifest-review/SKILL.md -o ~/.agents/skills/kubernetes-manifest-review/SKILL.md
New-Item -ItemType Directory -Force "$HOME\.claude\skills\kubernetes-manifest-review" | Out-Null; Invoke-WebRequest https://anymodel.org/en/skills/devops/kubernetes-manifest-review/SKILL.md -UseBasicParsing -OutFile "$HOME\.claude\skills\kubernetes-manifest-review\SKILL.md"
New-Item -ItemType Directory -Force "$HOME\.agents\skills\kubernetes-manifest-review" | Out-Null; Invoke-WebRequest https://anymodel.org/en/skills/devops/kubernetes-manifest-review/SKILL.md -UseBasicParsing -OutFile "$HOME\.agents\skills\kubernetes-manifest-review\SKILL.md"
Any other agent: save the file into its skills folder, or give it the link to the file: https://anymodel.org/en/skills/devops/kubernetes-manifest-review/SKILL.md
SKILL.md
Kubernetes Manifest Review
Review Deployments, StatefulSets, Services, Ingresses and Helm values for production readiness. Read all manifests of the app together (workload, service, config, PDB, HPA, network policy) before judging any one of them.
Workflow
- Locate manifests (
k8s/,deploy/,charts/, kustomize overlays). If Helm, render first:helm template <release> <chart> -f values.yaml. - Run through the checklist and note each finding with
kind/name, field path and severity. - Fix with minimal edits that keep the existing structure (kustomize patches, values keys).
- Verify against the cluster in read-only mode (see Verification). Never
kubectl applyordeletewithout the user's explicit confirmation, and confirm which cluster and namespace the current context points to.
Checklist
Image
- Tag is a specific version or digest, never
latestor an omitted tag. imagePullPolicymatches:IfNotPresentfor immutable tags,Alwaysonly if tags are mutable.imagePullSecretsset for private registries.
Resources
- Every container has
resources.requestsfor cpu and memory, and a memorylimitsvalue. Treat a CPU limit as optional and discuss throttling with the user before adding one. - Memory request should be close to the limit for predictable scheduling; check the numbers against actual usage if metrics are available (
kubectl top pod). - Set the JVM/Node heap flags relative to the memory limit.
Probes
readinessProbegates traffic;livenessProberestarts stuck processes;startupProbeprotects slow starts.- Liveness must not depend on external services (database, other pods), otherwise an outage causes a restart storm.
- Set sensible
initialDelaySeconds,periodSeconds,timeoutSeconds,failureThreshold. Probe paths must exist in the app.
securityContext
- Pod level:
runAsNonRoot: true,runAsUsernumeric,seccompProfile: {type: RuntimeDefault},fsGroupif volumes are written. - Container level:
allowPrivilegeEscalation: false,readOnlyRootFilesystem: true(addemptyDirmounts for/tmpand cache dirs),capabilities: {drop: ["ALL"]}. - No
privileged: true,hostNetwork,hostPathunless the user explains why. automountServiceAccountToken: falsewhen the pod does not call the API; use a dedicated ServiceAccount.
Availability and rollout
replicas >= 2for anything user-facing; spread withtopologySpreadConstraintsor pod anti-affinity.- Add a
PodDisruptionBudget(minAvailableormaxUnavailable) so node drains do not take the service down. - Deployment strategy:
RollingUpdatewithmaxUnavailable: 0andmaxSurge: 1for zero-downtime;minReadySecondsif needed. StatefulSets need an update strategy that fits the data store. - Add a
preStopsleep andterminationGracePeriodSecondslong enough to drain connections. - HPA targets must reference requests that exist.
Config and secrets
- Secrets come from
Secretobjects or an external secret operator, not plainenv: value:in the manifest. - Never put secret values into ConfigMaps, Helm values committed to git, or labels/annotations.
- Mount config as files or use
envFrom; changing a ConfigMap does not restart pods by itself, so check for a checksum annotation or reloader.
Networking and labels
- Service selector matches pod labels exactly; ports and
targetPortnames line up. - Consistent
app.kubernetes.io/*labels. ANetworkPolicyexists when the cluster enforces them. - Ingress has TLS and a sensible body-size/timeout configuration where the controller needs one.
Verification
kubectl config current-context
kubectl diff -f manifest.yaml # read-only, shows what would change
kubectl apply --dry-run=server -f manifest.yaml # schema and admission check
kubectl auth can-i create deployments -n <ns>
helm lint ./chart && helm template r ./chart | kubectl apply --dry-run=server -f -
If kubeconform, kube-linter or kubescape are installed, run them and include the output summary.
Output format
Report:
- Findings table:
severity | resource | field | problem | recommended change. - The edited manifests or a diff.
- Results of diff and dry-run, with the cluster context used.
- Open questions for the user (real resource usage, expected traffic, compliance needs).
Pitfalls
- Do not add a CPU limit or tight memory limit blindly; it can cause throttling or OOM kills. Ask for real usage data.
readOnlyRootFilesystembreaks apps that write to disk; test it and add writable volumes.- Do not change
selectorof an existing Deployment; the field is immutable. - Do not rename PVCs or StatefulSet volume templates; that orphans data.
- Never run
kubectl delete,scale 0orrollout restarton a shared cluster without confirmation.
Source: AnyModel skills catalog · License: CC BY 4.0
Connect through AnyModel API
This skill runs on whatever model your agent uses. Point Claude Code, Codex or Cursor at AnyModel to run it on Claude, GPT, Gemini and more with one key — pay per token, no subscription.
AnyModel