Kubernetes Deployment, HPA & Resource Limits Review
Audit Kubernetes manifests for CPU/memory requests, readiness/liveness probes, HPA, and Pod Disruption Budgets.
Interactive Prompt Playground
{{K8S_YAML}}{{CLUSTER_ENV}}{{TRAFFIC_PROFILE}}You are a Principal Site Reliability Engineer (SRE) and Kubernetes Cluster Architect.
Review and harden the following Kubernetes manifests:
Kubernetes Manifests (Deployment / Service / HPA / PDB):
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-service
spec:
replicas: 3
selector:
matchLabels:
app: api-service
template:
metadata:
labels:
app: api-service
spec:
containers:
- name: api
image: myregistry.com/api:v1.2.0
ports:
- containerPort: 8080
```
Cluster Environment: AWS EKS 1.30 with Karpenter autoscaling
Target Traffic Profile: SaaS API with 2,000 req/sec average and 10x morning traffic spikes
Audit across production SRE reliability standards:
1. **Resource Sizing (Requests & Limits)**:
- Check CPU and Memory requests and limits to avoid CPU throttling or out-of-memory (OOMKilled) pod evictions.
- Ensure requests are sized for standard traffic and limits accommodate safe bursts.
2. **Health Probes (Startup, Liveness, Readiness)**:
- Are readiness probes configured to stop traffic during warm-up or database re-connections?
- Is a startup probe used for slow-starting applications to prevent premature liveness kills?
3. **High Availability & Zero-Downtime Rollouts**:
- Is `PodDisruptionBudget` (PDB) configured to ensure minimum available pods during node upgrades?
- Check `topologySpreadConstraints` or `podAntiAffinity` to spread pods across availability zones.
4. **Security Context**:
- Enforce `readOnlyRootFilesystem: true`, `allowPrivilegeEscalation: false`, and drop `ALL` capabilities.
5. **Hardened Manifests Output**:
- Provide the complete, production-ready YAML manifests with comments.How to Use This Prompt
- Paste your Deployment, Service, and HPA YAML.
- Specify your Kubernetes distribution and traffic scale.
- Receive hardened manifests with exact resource limits, probes, and PDB definitions.
Engineering Tips & Best Practices
- Never use CPU limits without careful testing in latency-sensitive services, as Linux CFS quota throttling can introduce latency spikes.
What This Prompt Inspects
Key failure modes, design principles, and quality standards evaluated during execution.
Anti-Affinity / Multi-AZ
Spreads pod replicas across multiple Availability Zones to withstand AZ outages.
Startup vs Liveness Probes
Prevents container kill loops during initial database connection warm-up.
Pod Disruption Budget
Ensures nodes can be safely drained without causing 503 gateway outages.
SprintKit Workflow Integrations
Complementary interactive tools and workflows across SprintKit to accelerate your engineering process.
Related Prompts
Explore related developer prompts in this workflow domain.
Production Dockerfile Multi-Stage Optimization & Hardening
Optimize Dockerfiles for minimal image size, non-root security, layer caching, and CVE vulnerability reduction.
GitHub Actions CI/CD Pipeline & Caching Optimizer
Speed up slow GitHub Actions workflows with dependency caching, matrix parallelization, and security secrets.
Infrastructure-as-Code (Terraform) Security & Drift Review
Audit Terraform HCL code for IAM over-permissioning, unencrypted storage, public security groups, and drift risks.