Ask Claude to Generate Kubernetes Manifests from Your Application Config
Writing Kubernetes manifests from scratch means translating your app's requirements into YAML — ports, environment variables, health checks, resource limits, and secrets. Claude reads your actual application config and generates manifests that match.
Read my Dockerfile, .env.example, and health check endpoints. Generate
Kubernetes manifests: a Deployment, Service, and Ingress. Set resource
limits based on the app type and configure proper liveness and readiness probes.
Claude checks your app's exposed ports, required environment variables, and framework conventions to produce k8s manifests that work:
# Claude generates from your actual app config
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 2
template:
spec:
containers:
- name: app
image: my-app:latest
ports:
- containerPort: 3000
envFrom:
- secretRef:
name: my-app-secrets
livenessProbe:
httpGet:
path: /health
port: 3000
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "500m"
Target different deployment needs:
# Full stack deployment
Generate k8s manifests for the app, database, and Redis.
Include persistent volumes for the database and proper networking.
# Auto-scaling
Add a HorizontalPodAutoscaler that scales between 2 and 10 pods
based on CPU and memory usage.
# Debug existing manifests
My pods keep crashing. Read the deployment manifest and the Dockerfile
to find mismatches — wrong ports, missing env vars, or incorrect paths.
# Helm chart
Convert my raw manifests into a Helm chart with values.yaml for
environment-specific overrides (staging vs production).
Kubernetes config should mirror your app's reality — let Claude read the app and generate manifests that match instead of copying from tutorials.
via Claude Code
Log in to leave a comment.
Set up Claude Code as an automated reviewer in your CI pipeline — on every pull request, it reads the diff, checks for bugs, security issues, missing tests, and convention violations, then posts its findings as a PR comment. Your human reviewers get a head start because the obvious issues are already flagged before they look.
Before deploying, tell Claude to read your project — migrations, environment variables, queue workers, scheduled tasks, caching, third-party integrations — and generate a deployment checklist that's specific to your app. Not a generic "did you run migrations?" list, but one that knows YOUR infrastructure and catches the things YOUR deploy can break.
Instead of writing a README from memory or copying a template, tell Claude to read your project and generate one that's actually accurate — real setup instructions from your config, real architecture from your directory structure, real API examples from your routes, and real prerequisites from your dependency files.