Skip to content

skillDevOps and cloudkubernetes

Kubernetes Manifest Review

Reviews Kubernetes manifests for missing limits, probes, security context and unsafe rollout settings, and returns fixes ranked by risk.

npx workspacetemplates add kubernetes-manifest-review --tool claude-code

Writes 1 file to .claude/skills/kubernetes-manifest-review/

.claude/skills/kubernetes-manifest-review/SKILL.md30 lines · 1.6 KBFile
---
name: kubernetes-manifest-review
description: Reviews Kubernetes manifests for missing limits, probes, security context and unsafe rollout settings, and returns fixes ranked by risk.
---

# Kubernetes manifest review

Review the manifests as if you will be paged when they fail.

## Steps

1. Find all manifests, Kustomize overlays and rendered Helm output (`helm template`). Review the rendered result, not the template.
2. For every workload (Deployment, StatefulSet, DaemonSet, Job, CronJob) check:
   - **Resources**: `requests` and `limits` for memory and CPU. Memory limit should be set; a CPU limit is optional but requests are not.
   - **Probes**: a `readinessProbe` that exercises the app, a `livenessProbe` that does not depend on downstream services, and a `startupProbe` for slow starts.
   - **Security context**: `runAsNonRoot: true`, `allowPrivilegeEscalation: false`, `readOnlyRootFilesystem: true`, `capabilities.drop: [ALL]`, no `privileged`.
   - **Rollout**: `maxUnavailable`, `maxSurge`, `minReadySeconds`, and a PodDisruptionBudget for anything with two or more replicas.
   - **Availability**: replicas of at least 2 for serving workloads, plus topology spread or anti-affinity.
   - **Images**: no `latest` tag, a digest or exact version, and `imagePullPolicy` that matches.
   - **Config**: secrets from `secretKeyRef`, never inline values.
3. Validate with `kubectl apply --dry-run=server` or `kubeconform` when available.

## Rules

- Do not apply anything to a cluster.
- Only flag what you can point to by resource and field.

## Report

Findings grouped as blocker, should fix, consider. For each: resource, field, why it matters, and the YAML fix.

What it does

Manifests that apply cleanly can still take a cluster down: a pod with no memory limit, a readiness probe that checks nothing, a deployment that replaces every replica at once. This skill reads each manifest the way an on-call engineer would and flags what will hurt at 3 a.m.

Findings are tied to the exact resource and field, and each comes with the YAML to change. Style preferences are skipped.

Example

you › Review k8s/ before we deploy to production

agent › Blockers: deployment/api has no readinessProbe, so traffic reaches pods before they are ready (k8s/api.yaml:34). deployment/api runs as root with no securityContext. Should fix: no PodDisruptionBudget for api with 3 replicas; image tag is latest. Validated with kubeconform: 0 schema errors.

Questions

Does it need cluster access?
No. It reads files and, if you have them installed, runs offline validators. It never applies or deletes anything.
Why review rendered Helm output?
Values change what a chart produces, so the template alone does not show what will reach the cluster.
  • CI Pipeline Speedup

    SkillDevOps and cloud

    Free
  • Deployment Strategies

    SkillDevOps and cloud

    Free