DevOps & Cloud

Verified against ChatGPT · 2026-08-12

Write a Kubernetes manifest that won't get OOMKilled at 2am because nobody set real resource limits

Generates a Deployment/Service manifest set with resource requests and limits derived from actual observed usage, a rollout strategy suited to the workload, and readiness/liveness probes that won't cause a self-inflicted outage during deploy.

ChatGPT (GPT-5.1)4 fillable variables

The prompt

Ready to copy — highlighted parts are example details you can swap.

You are a senior software engineer producing Kubernetes manifests for a workload that's about to go into a shared cluster, where a badly configured resource limit or probe can take down more than just this one service. I'll give you the app details; you produce the manifests plus a note on every number you chose.

APP AND WORKLOAD TYPE
Stateless Go REST API, no local disk state, currently 3 replicas manually

OBSERVED RESOURCE USAGE
p95 CPU around 180m and memory steady around 220Mi under normal load, based on 2 weeks of Prometheus data; no data yet for peak traffic events

CLUSTER CONSTRAINTS
Shared EKS cluster, nodes are m5.xlarge, cluster-autoscaler scales nodes down aggressively overnight

TRAFFIC PATTERN AND STARTUP BEHAVIOR
Takes about 12 seconds to accept traffic after container start due to a connection pool warm-up; no slow JIT concerns since it's compiled Go

REQUIREMENTS
Set CPU and memory requests based on the observed usage given, not round-number guesses — requests should reflect steady-state usage so the scheduler doesn't over- or under-pack the node, and limits should give headroom for the traffic pattern described without being so loose that one pod can starve its neighbors. If observed usage isn't given for a number you need, say so explicitly and propose a conservative starting value with an instruction to revisit it after real metrics exist, rather than inventing a number that looks authoritative. Design readinessProbe and livenessProbe separately and explain the difference in consequence if each is misconfigured: a wrong readiness probe removes a pod from load balancing, a wrong liveness probe kills and restarts a container, which is a much more disruptive failure if the timing is wrong for a slow-starting app. Choose a rollout strategy (RollingUpdate parameters, or a note on why Recreate might apply) based on the startup behavior given, and set `maxUnavailable`/`maxSurge` values you can justify rather than leaving Kubernetes defaults unexamined. Include a PodDisruptionBudget if the cluster constraints suggest node maintenance or autoscaling events are a real risk for this workload.

WHAT NOT TO DO
Do not add a HorizontalPodAutoscaler, NetworkPolicy, or other manifest the user didn't ask about — list them as a separate 'you might also want' suggestion instead of inlining them into the required output. Do not set `limits` equal to `requests` by default (this causes CPU throttling under normal load) without explicitly confirming that's actually what's wanted here.

OUTPUT FORMAT
1. The full manifest YAML (Deployment, Service, and PodDisruptionBudget if applicable) in one code block.
2. A table of every resource/probe/rollout value chosen, the reasoning, and whether it's based on real data or a conservative placeholder.
3. A short 'you might also want' list of manifests not included.

Customize

Optional — swap in your own details for the highlighted parts above.

Why this works

Requiring the model to tie CPU and memory requests to actual observed usage, and to say so explicitly when no data exists, closes off the most common failure mode in generated manifests: a plausible-looking `resources` block with round numbers like `500m`/`512Mi` that were never checked against anything and that either starve the pod under real load or waste so much capacity that the scheduler can't bin-pack the node efficiently — both outcomes look fine in a code review and only surface as an incident later. Separating the readiness and liveness probe reasoning is a direct fix for a specific, well-documented Kubernetes footgun: a liveness probe timed too aggressively for an app with a real startup delay causes Kubernetes to kill and restart a container that was simply still warming up, which creates a crash loop that looks like an application bug but is actually a probe misconfiguration — asking the model to reason about consequence-of-misconfiguration per probe type, rather than filling in both with the same default timing, is what prevents this. Tying the rollout strategy's `maxUnavailable`/`maxSurge` to the startup behavior given, rather than accepting Kubernetes' defaults silently, matters because the default RollingUpdate settings assume a fast-starting pod; an app with a 12-second warm-up rolled out with default surge settings can end up briefly under-capacity during a deploy in exactly the way a PodDisruptionBudget and correct probe timing together are meant to prevent. Explicitly excluding HPA and NetworkPolicy unless asked keeps the deliverable scoped to what was actually requested instead of the model padding the answer with tangentially related manifests that dilute review attention away from the resource and probe numbers that actually carry risk here.

What you get back

resources: requests: { cpu: "200m", memory: "256Mi" } limits: { cpu: "500m", memory: "384Mi" } (based on p95 CPU 180m + 10% headroom; memory limit set above the 220Mi steady-state to absorb GC spikes, not equal to request to avoid CPU throttling) readinessProbe: initialDelaySeconds 15, periodSeconds 5 (accounts for the 12s warm-up plus margin) livenessProbe: initialDelaySeconds 30, periodSeconds 10, failureThreshold 3 (deliberately looser than readiness so a slow warm-up never triggers a restart)...

Verified against

ChatGPT GPT-5.1 · 2026-08-12

Changelog

  • 2026-08-12 Initial publish, verified against ChatGPT GPT-5.1.

Need this built into your business?

If a prompt isn't enough — custom software, built and maintained for you — that's Scult's day job.

EXPLORE CUSTOM SOFTWARE
Turn a working Dockerfile into a multi-stage build that doesn't ship your build toolchain to productionRewrites a single-stage Dockerfile into a hardened multi-stage build with a minimal runtime image, a non-root user, and an explicit rationale for every layer decision, so image size and attack surface actually get reviewed instead of copy-pasted from a tutorial.ChatGPT (GPT-5.1)2026-08-08Design a CI workflow that fails fast, isolates flaky tests, and doesn't punish contributors for a broken shared runnerBuilds a CI pipeline configuration (jobs, stages, caching, retry policy) for a real repo's constraints, plus an explicit flaky-test quarantine strategy, instead of a generic lint-test-build template that ignores how the team's tests actually behave today.ChatGPT (GPT-5.1)2026-08-10Get a security review of an infrastructure change before it merges, not a generic OWASP checklistReviews a specific infrastructure or config change (IaC diff, new service, permission grant) for concrete security issues tied to what actually changed, ranked by exploitability, instead of a boilerplate security checklist that doesn't engage with the diff.ChatGPT (GPT-5.1)2026-08-13Plan a major dependency upgrade so breaking changes get caught before your users find themTurns a scary major-version dependency bump into a scoped upgrade plan — breaking-change inventory, migration order, and a rollback trigger — based on the actual changelog and codebase usage instead of a blind bump-and-hope.ChatGPT (GPT-5.1)2026-08-14
All DevOps & Cloud prompts

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY