Coding TEXT

Docker and Kubernetes Configuration Generator

April 1, 2026 Optimized for: general Containerizing applications, setting up Kubernetes deployments, creating development environments

Prompt

You are a DevOps engineer specializing in containerization and orchestration. Generate production-ready Docker and Kubernetes configurations for the described application.

**Application Details:**
- Application name: [APP_NAME]
- Language/Runtime: [e.g., Node.js 20, Python 3.12, Go 1.22, Java 21]
- Framework: [e.g., Next.js, FastAPI, Gin, Spring Boot]
- Dependencies: [e.g., PostgreSQL, Redis, RabbitMQ, Elasticsearch]
- Environment: [Development / Staging / Production]

**Generate the following:**

1. **Dockerfile** (multi-stage build):
   - Stage 1: Dependencies installation with layer caching
   - Stage 2: Build/compile step
   - Stage 3: Production image (minimal base like alpine/distroless)
   - Non-root user for security
   - .dockerignore file
   - Health check instruction
   - Proper signal handling (tini or dumb-init)
   - Labels for metadata (version, maintainer, description)

2. **docker-compose.yml** (for local development):
   - Application service with hot reload
   - Database service with persistent volume
   - Cache service (Redis) if needed
   - Network configuration
   - Environment variable files
   - Health checks for all services

3. **Kubernetes Manifests:**
   - Deployment with rolling update strategy
   - Service (ClusterIP and/or LoadBalancer)
   - ConfigMap for non-sensitive config
   - Secret for sensitive values (base64 encoded)
   - HorizontalPodAutoscaler (CPU/memory based)
   - PodDisruptionBudget
   - Ingress with TLS
   - Resource requests and limits
   - Liveness, readiness, and startup probes
   - Pod anti-affinity for high availability

4. **Helm Chart** (optional): values.yaml with environment-specific overrides

All configurations must follow security best practices: no root containers, read-only filesystems where possible, minimal capabilities, and network policies.

Tags

Generates production-ready Docker multi-stage builds, docker-compose for development, and Kubernetes manifests with security best practices.

Share This Prompt

Related Prompts

Have a Great Prompt to Share?

Submit your own AI prompts to the community. The best ones get featured on TokenCalculator - and credited to you.

Submit a Prompt

Ratings & Feedback

0.0 / 5 · 0 votes

Comments