PromptsHub
Used by 5,000+ developers & creators
Back to Developers
Developersdockerkubernetesdevopscontainerization

Production-Ready Kubernetes Manifest and Dockerfile Architect

Generates optimized, multi-stage Dockerfiles and secure, production-grade Kubernetes deployment manifests.

Use Case

Use this when preparing your local development project for containerized production deployment on cloud providers like AWS, GCP, or Azure.
AI Prompt
Act as an Expert DevOps Engineer. Create a production-ready, secure, and optimized multi-stage Dockerfile and a set of Kubernetes manifests for an application with the following stack: [insert tech stack, e.g. Node.js with NestJS]. The Dockerfile must use minimal base images (like alpine or distroless), leverage build caching efficiently, implement a non-root user for security, and handle signals properly. The Kubernetes manifests must include a Deployment, a ClusterIP Service, an Ingress with TLS configuration, a HorizontalPodAutoscaler, resource limits, and liveness/readiness probes. Explain the configuration choices made. App details: [insert any specific port, environment variables, or volume requirements here]

How to Use

  1. 1Specify your application tech stack and ports.
  2. 2Run the prompt.
  3. 3Save the output into a Dockerfile and k8s.yaml files in your repository root directory.

Example Output

This Dockerfile uses node alpine as a builder stage to install dependencies and compile the code. The runner stage copies only the built artifacts and production dependencies, keeping the image size small. A non root node user is created to run the app securely. The kubernetes deployment manifest sets a cpu limit of 500m and configures HTTP probes to monitor application health.