ProSkillsLibraryFreePassScan
DevOps & Cloud

DevOps & Cloud · agent skill

K8s Manifest Review

Probes, limits and security contexts done right.

What it does

Loads when it is needed

Your agent loads it when the user writes or reviews Kubernetes manifests, Helm or Kustomize. It carries 5 rules and reads a profile.md with your details before it starts, so the output matches your brand and project.

Same prompt, with and without

Review payments-api deployment

Prompt · Review this deployment before we roll it to prod. The pods keep getting OOMKilled and I don't know why.

# k8s/payments-api/deployment.yaml
1 apiVersion: apps/v1
2 kind: Deployment
3 metadata: { name: payments-api, namespace: production }
4 spec:
5   replicas: 3
6   selector: { matchLabels: { app: payments-api } }
7   template:
8     metadata: { labels: { app: payments-api } }
9     spec:
10      containers:
11        - name: api
12          image: eu.gcr.io/acme/payments-api:stable
13          ports: [{ containerPort: 8080 }]
14          resources:
15            requests: { memory: 256Mi }
16            limits: { memory: 1Gi }
17          livenessProbe:
18            httpGet: { path: /health, port: 8080 }   # handler queries Postgres and Redis
19            periodSeconds: 5
20            timeoutSeconds: 1
21          env:
22            - name: STRIPE_SECRET_KEY
23              value: "sk_live_51Nx0...redacted"
24            - name: JAVA_OPTS
25              value: "-Xmx1g"

Profile used: GCP, Kubernetes (GKE), GitHub Actions; staging, production

Without the skill
Why the OOMKills: JAVA_OPTS has -Xmx1g and the container memory limit is 1Gi. The JVM needs memory beyond the heap (metaspace, thread stacks, code cache, direct buffers), so total usage exceeds 1Gi and the kernel kills it. Set the heap well below the limit, e.g. -XX:MaxRAMPercentage=65 (or -Xmx650m), or raise the limit. Also set the memory request equal to the limit (it's 256Mi vs 1Gi now), so the scheduler doesn't pack nodes that can't actually hold the pods. Other issues, in priority order: 1. Live Stripe key in plain text in the manifest (and git). Treat it as leaked: rotate it, and move it to a Kubernetes Secret (or Secret Manager via the CSI driver) referenced with secretKeyRef. 2. The liveness probe calls /health, which queries Postgres and Redis, with timeoutSeconds: 1 and period 5. A slow DB makes every pod fail liveness and restart together, which turns a DB blip into an outage. Make liveness a cheap process check, and put the dependency checks in a readinessProbe with saner timeouts. Add a startupProbe for JVM warmup. 3. Image tag :stable is mutable, so you can't tell what's running or roll back. Use a version tag or digest. 4. Missing: CPU requests, securityContext (runAsNonRoot, readOnlyRootFilesystem), a PodDisruptionBudget, and a rollout strategy (maxUnavailable: 0).
With the skill
Kubernetes review: payments-api Scope: 1 Deployment (production). Not rendered: plain YAML, no cluster contacted. Verdict: Request changes (2 blockers, 3 should-fix) [blocker] k8s/payments-api/deployment.yaml:22 Live Stripe key as a literal env value (value redacted): anyone who can read the Deployment or the repo has it. Fix: rotate it, then valueFrom: { secretKeyRef: { name: payments-secrets, key: stripe-secret-key } }, filled from Secret Manager. [blocker] deployment.yaml:12 Mutable tag :stable in production: a rollback pulls whatever stable is now, and nodes can run different builds. Fix: image: eu.gcr.io/acme/payments-api:1.14.3 (or a digest), set by CI. [should-fix] deployment.yaml:15-16, 24-25 (the OOMKills) -Xmx1g equals the 1Gi limit, so the heap alone can fill the container; metaspace, threads and buffers push it over and the kernel kills it. The 256Mi request also lets the scheduler overpack nodes. Fix: requests and limits memory 1536Mi, JAVA_OPTS -XX:MaxRAMPercentage=70 (about 1.05 GiB heap, same as today). Resize from observed p90 RSS. Add a CPU request, no CPU limit. [should-fix] deployment.yaml:17-20 Liveness hits /health, which queries Postgres and Redis, every 5 s with a 1 s timeout. A database blip fails all 3 pods together and Kubernetes restarts them: partial outage becomes full. There is no readiness probe, so cold pods get traffic. Fix: livenessProbe /livez (period 10, timeout 2), readinessProbe /readyz, startupProbe. [should-fix] whole pod spec No securityContext, PodDisruptionBudget, zone spread, or preStop sleep. Add runAsNonRoot, readOnlyRootFilesystem, drop ALL, maxUnavailable: 1, a preStop sleep 10 and terminationGracePeriodSeconds 45.

Both answers from the same model (Claude sonnet), 2026-10-16. The one without the skill was written in a separate session that never saw it. Shortened where marked with …

Install

One command, in your project

It detects your agent; add --agent all for every agent.

npx proskills-cli add k8s-manifest-review --order <order id from your receipt>

Or copy the skill folder (the one holding SKILL.md) into the directory your agent reads, then restart it or start a new session.

AgentThis projectEvery project
Claude Code.claude/skills/~/.claude/skills/
Cursor.agents/skills/ (or .cursor/skills/)~/.cursor/skills/
Codex.agents/skills/~/.agents/skills/
Gemini CLI.agents/skills/ (or .gemini/skills/)~/.gemini/skills/

Changelog

What changed

  • v1.0.0 · 2026-10-16
    • First versioned release: Probes, limits and security contexts done right.
    • Scanned 100/100 before release.

Keep it current with npx proskills-cli update; your profile.md is never touched. Everyone who bought it gets the update free and an email when it lands.

Same collection

More from DevOps & Cloud

The scan checks spec compliance, token cost, clarity and security patterns. A clean scan is not a guarantee: static scanners can be evaded. Scan any skill yourself.