DevOps

Kubernetes Deployment Generator

Configure and generate a Kubernetes Deployment manifest for an application.

Features

  • Set application image and replica count
  • Configure common deployment options
  • Copy or download the generated YAML

How to use it

  1. Enter the application name, container image, and deployment settings.
  2. Review the generated manifest.
  3. Copy or download it and validate it for your cluster.

Example and use cases

Generate a Deployment manifest for an application image with a chosen number of replicas.

Useful for creating a starting Deployment manifest for Kubernetes learning and application setup.

Kubernetes DevOps Tool

Kubernetes Deployment Generator

Generate a Kubernetes Deployment YAML configuration for your containerized application with replicas, resources, environment variables and health probes.

Advertisement

Ad space

Deployment Configuration

Configure your Kubernetes Deployment.

Application

Networking

Note: Service Port is kept as a configuration field for future Service generation. This Deployment YAML exposes the container port.

Environment Variables

Add one variable per line using KEY=VALUE format.

Health Probes

Generated YAML

Kubernetes Deployment configuration

apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-app-deployment
  labels:
    app: my-app
spec:
  replicas: 2
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
        - name: my-app
          image: nginx:latest
          imagePullPolicy: IfNotPresent
          ports:
            - name: http
              containerPort: 3000
              protocol: TCP
          env:
            - name: NODE_ENV
              value: "production"
            - name: PORT
              value: "3000"
          resources:
            requests:
              cpu: 100m
              memory: 128Mi
            limits:
              cpu: 500m
              memory: 512Mi
          livenessProbe:
            httpGet:
              path: /
              port: http
            initialDelaySeconds: 15
            periodSeconds: 10
            timeoutSeconds: 5
            failureThreshold: 3
          readinessProbe:
            httpGet:
              path: /
              port: http
            initialDelaySeconds: 5
            periodSeconds: 10
            timeoutSeconds: 5
            failureThreshold: 3

Advertisement

Ad space

Kubernetes Deployment Generator

A Kubernetes Deployment defines the desired state for running application Pods. It can specify the container image, number of replicas, labels, ports, environment variables, resource requests and limits, and health probes.

What Does a Kubernetes Deployment Do?

A Deployment manages a set of Pods running the same application. Kubernetes uses the Deployment specification to maintain the desired number of replicas and perform controlled updates when the application version changes.

Kubernetes Deployment YAML Example

apiVersion: apps/v1
kind: Deployment
metadata:
  name: web-app-deployment
spec:
  replicas: 3
  selector:
    matchLabels:
      app: web-app
  template:
    metadata:
      labels:
        app: web-app
    spec:
      containers:
        - name: web-app
          image: nginx:latest
          ports:
            - containerPort: 3000

Important Kubernetes Deployment Fields

FieldPurpose
replicasSpecifies how many Pod replicas should run.
selectorIdentifies the Pods managed by the Deployment.
imageSpecifies the container image to run.
containerPortDocuments the port exposed by the container.
resourcesDefines CPU and memory requests and limits.
livenessProbeHelps Kubernetes determine whether a container should be restarted.
readinessProbeHelps Kubernetes determine whether a Pod is ready to receive traffic.

How to Use This Generator

  1. 1. Enter your application name.
  2. 2. Enter the Docker image that Kubernetes should run.
  3. 3. Select the number of replicas required for your application.
  4. 4. Configure ports and environment variables.
  5. 5. Add resource requests and limits when appropriate.
  6. 6. Configure health probes for applications that expose a health endpoint.
  7. 7. Copy or download the generated YAML.

Review before deploying

Generated YAML is a starting configuration. Review image versions, resource limits, environment variables, namespaces, health-check paths and security settings before deploying to a production Kubernetes cluster.

Frequently Asked Questions

What is a Kubernetes Deployment?

A Deployment is a Kubernetes resource that manages replicated Pods and supports controlled application updates.

What is the replicas field?

The replicas field specifies the desired number of Pod instances for the Deployment.

What Docker image should I use?

Use the image name and tag published by your container registry, such as nginx:latest, node:20-alpine or your private registry image.

What are Kubernetes resource requests and limits?

Requests represent the resources a Pod asks Kubernetes to reserve, while limits define the maximum CPU and memory resources the container can consume.

What is a readiness probe?

A readiness probe helps Kubernetes determine whether a container is ready to receive application traffic.

Does this generator create a Kubernetes Service?

No. This page generates the Deployment resource. A Kubernetes Service is a separate resource and can be generated using a Kubernetes Service Generator.

Related Kubernetes & DevOps Tools

Bottom Advertisement

Ad space

Frequently asked questions

Is the generated manifest ready for production?

Treat it as a starting point and review resource limits, probes, security settings, and cluster requirements before applying it.

Related developer tools