---
name: kubernetes-manifest-check
description: "Reviews Kubernetes manifests for resource limits, probes, rollout settings, disruption budgets, and security context, then returns corrected YAML with special attention to liveness probes that restart healthy pods. Use when Kubernetes manifests are in hand and need a review of resource limits, probes, rollout settings, and security context before they reach a cluster. Do not use for diagnosing a deployment already crash-looping from logs or writing a Helm chart. Related topics: Engineering, Technical, Coding."
---

# Kubernetes Manifest Check

Reviews Kubernetes manifests for resource limits, probes, rollout settings, disruption budgets, and security context, then returns corrected YAML with special attention to liveness probes that restart healthy pods.

## When to use

Use this skill when Kubernetes manifests are in hand and need a review of resource limits, probes, rollout settings, and security context before they reach a cluster. Do not use it for diagnosing a deployment already crash-looping from logs or writing a Helm chart.

## Workflow

1. Ask the user for each input listed below in a single message, skipping any they have already given. Where options are listed, offer them, but accept other answers too.
2. Compare requests and limits with the described behaviour, noting whether the likely failure is throttling or eviction.
3. Check each probe for the right type, timing, and endpoint, and add a startup probe for slow starters.
4. Review rolling update settings, disruption budgets, and spread rules for the replica count.
5. Check the security context for root, writable filesystem, and unneeded capabilities.
6. Return prioritised findings with field paths, then the corrected manifests with a comment per change.

## Inputs

- **The manifests** (longer free text)
- **What the app does** (longer free text)
- **Cluster** (longer free text)
- **Symptoms** (longer free text)
- **Environment** (choose one: Development, Staging, Production)

## Output

A prioritised findings list with a field path per item, followed by corrected YAML manifests with a comment on each changed field.

## Prompt template

Fill the inputs into this template and follow it as the full instruction.

### Kubernetes Manifest Check

Review my manifests and return corrected versions.

- The manifests: {{The manifests}}
- What the app does: {{What the app does}}
- Cluster: {{Cluster}}
- Symptoms: {{Symptoms}}
- Environment: {{Environment}}

Check requests and limits against how the app actually behaves, since wrong values cause both throttling and eviction and the symptoms look nothing alike. Look hard at the probes. A liveness probe configured like a readiness probe will restart a healthy pod that is merely slow, and that failure mode is miserable to debug; use a startup probe for slow starters. Then review rolling update settings (maxSurge and maxUnavailable), PodDisruptionBudgets, anti-affinity or topology spread, and the security context (non-root, read-only root filesystem, dropped capabilities). Tune strictness to the environment: Production findings are blocking, Development findings are advice. Return the findings as a prioritised list with the field path for each, then the corrected manifests with a comment on every changed field.

## Pitfalls

- Pointing the liveness probe at a dependency check, so a database blip restarts every healthy pod at once.
- Setting CPU limits equal to requests on a bursty app, which throttles it with no visible error.
- Setting maxUnavailable above zero on a single-replica Deployment, which guarantees downtime on each rollout.
