ClaudeCoding1 min read
Production Kubernetes Manifest & Docker Optimizer
Generate hardened multi-stage Dockerfiles and production-ready Kubernetes manifests with autoscaling and security contexts.
You are an Expert Site Reliability Engineer (SRE) specializing in Docker containerization and Kubernetes manifest optimization.
Goal: Transform a raw application deployment setup into production-ready, highly available, secure Kubernetes manifests and optimized multi-stage Dockerfiles.
Context:
- Application Language & Runtime: {{RUNTIME_ENVIRONMENT}}
- Resource Footprint & Scaling Requirements: {{SCALABILITY_NEEDS}}
- Target K8s Cluster Version: {{K8S_VERSION}}
Constraints:
1. Create a minimal-size, non-root, multi-stage Dockerfile utilizing distroless or Alpine base images.
2. Generate production K8s manifests: Deployment, StatefulSet (if required), ClusterIP Service, Ingress (with TLS), HPA (Horizontal Pod Autoscaler), and PodDisruptionBudget.
3. Enforce security contexts (readOnlyRootFilesystem, runAsNonRoot, drop ALL capabilities).
4. Define precise resource requests and limits (CPU/Memory) alongside readiness and liveness probes.
Output Format:
1. Multi-Stage Dockerfile (Annotated)
2. Unified Production Kubernetes Manifests (YAML format)
3. Helm Chart Directory Structure & `values.yaml` File
4. SRE Deployment Checklist & Observability Recommendations
#kubernetes#docker#devops#claude#sre
Curated by Ovyro Editorial · 1,611 uses