Kubernetes manifest builder

Kubernetes Deployment YAML Generator

A Kubernetes Deployment YAML generator creates a practical starting manifest for running an app with replicas, resource requests, limits, health probes, labels, and rollout settings. Use this free tool to draft copy-ready K8s YAML before committing it to your infrastructure repo.

Manifest inputs

Fill in the workload settings to generate a deployment-ready manifest bundle.

Environment variables

Generated YAML

Copy this manifest into your repo, review secrets separately, then apply it to staging first.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: api-gateway
  namespace: production
  labels:
    app: api-gateway
    component: web
spec:
  replicas: 3
  revisionHistoryLimit: 3
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  selector:
    matchLabels:
      app: api-gateway
  template:
    metadata:
      labels:
        app: api-gateway
        component: web
    spec:
      containers:
        - name: api-gateway
          image: registry.example.com/api-gateway:1.4.2
          imagePullPolicy: IfNotPresent
          ports:
            - name: http
              containerPort: 3000
              protocol: TCP
          env:
            - name: NODE_ENV
              value: "production"
            - name: LOG_LEVEL
              value: "info"
          resources:
            requests:
              cpu: 250m
              memory: 256Mi
            limits:
              cpu: 750m
              memory: 768Mi
          readinessProbe:
            httpGet:
              path: /healthz
              port: http
            initialDelaySeconds: 10
            periodSeconds: 10
            timeoutSeconds: 3
            failureThreshold: 3
          livenessProbe:
            httpGet:
              path: /livez
              port: http
            initialDelaySeconds: 30
            periodSeconds: 20
            timeoutSeconds: 3
            failureThreshold: 3
---
apiVersion: v1
kind: Service
metadata:
  name: api-gateway
  namespace: production
  labels:
    app: api-gateway
spec:
  type: ClusterIP
  selector:
    app: api-gateway
  ports:
    - name: http
      port: 80
      targetPort: http
      protocol: TCP
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: api-gateway
  namespace: production
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: api-gateway
  minReplicas: 3
  maxReplicas: 9
  metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          type: Utilization
          averageUtilization: 70
    - type: Resource
      resource:
        name: memory
        target:
          type: Utilization
          averageUtilization: 80
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: api-gateway-config
  namespace: production
data:
  NODE_ENV: "production"
  LOG_LEVEL: "info"

Review before applying

  • Use a pinned image tag or digest for api-gateway; avoid mutable latest tags.
  • Confirm readiness and liveness paths return fast 200 responses in the container.
  • Store secrets in Kubernetes Secret objects, not ConfigMaps or plain env values.
  • Set resource requests low enough to schedule and limits high enough for peak load.
  • Install metrics-server before relying on the HorizontalPodAutoscaler.
  • Apply to staging first, then verify rollout status before production.

What a production-ready Deployment should include

Production Kubernetes manifests need more than an image and a port. A reliable Deployment defines selectors, labels, rollout strategy, resource requests and limits, readiness probes, liveness probes, and enough replicas to survive a rolling update.

This generator keeps the output explicit so teams can review every field before applying it. Add ingress, secrets, network policies, pod disruption budgets, and service accounts as your cluster standards require.

Frequently asked questions

What is a Kubernetes Deployment YAML generator?

A Kubernetes Deployment YAML generator creates a starting manifest for running application pods with replicas, resource limits, probes, labels, and rollout settings.

Should secrets go in generated YAML?

No. Store passwords, tokens, and private keys in Kubernetes Secrets or an external secrets operator, not in plain Deployment or ConfigMap YAML.

What probes should a Deployment include?

A web app should usually include a readiness probe for traffic routing and a liveness probe for process recovery. Both should use fast health endpoints.

How many replicas should a Deployment start with?

Use at least two replicas for production web services so one pod can be unavailable during a rolling update without stopping all traffic.

Can I apply this YAML directly to production?

Treat the output as a strong starting point. Review image tags, resources, namespaces, secrets, ingress, and policy requirements before production.

Related tools

Need deployment help after the manifest?

NitroBuilds helps developers turn projects into production-ready builds with CI/CD, observability, rollback planning, and practical launch checklists.

Explore NitroBuilds