LiveFor platform engineers & developers

Kubernetes YAML Generator

Builds Kubernetes manifests (Deployment, Service, Ingress, HPA, ConfigMap, PodDisruptionBudget) with probes, resource limits and a hardened security context.

Runs in your browser. Your data never leaves this device.
~/apps/kubernetes-yaml-generatorruns in your browser · nothing uploaded
Used for every object and the app.kubernetes.io/name label
 
Pin a version: registry/org/app:1.2.3
 

Resources

Guaranteed share, e.g. 100m = 0.1 core
 
Many teams leave this empty to avoid throttling
The pod is killed (OOMKilled) above this

Health checks

 

Exposure

 
 
 
 
nginx, traefik, azure-application-gateway…

Scaling and availability

 
 
 

Configuration

KEY=value, one per line. Kept in this browser, not in the share link
Kubernetes manifests
apiVersion: v1
kind: Namespace
metadata:
  name: shop
  labels:
    pod-security.kubernetes.io/enforce: restricted
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: web-config
  namespace: shop
  labels:
    app.kubernetes.io/name: web
data:
  LOG_LEVEL: info
  ASPNETCORE_URLS: http://+:8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: web
  namespace: shop
  labels: &a1
    app.kubernetes.io/name: web
spec:
  revisionHistoryLimit: 5
  selector:
    matchLabels: *a1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 0
      maxSurge: 1
  template:
    metadata:
      labels: *a1
    spec:
      automountServiceAccountToken: false
      securityContext:
        runAsNonRoot: true
        runAsUser: 10001
        runAsGroup: 10001
        fsGroup: 10001
        seccompProfile:
          type: RuntimeDefault
      containers:
        - name: web
          image: ghcr.io/contoso/web:1.4.2
          ports:
            - name: http
              containerPort: 8080
          envFrom:
            - configMapRef:
                name: web-config
          resources:
            requests:
              cpu: 100m
              memory: 128Mi
            limits:
              memory: 256Mi
          readinessProbe:
            httpGet: &a2
              path: /healthz
              port: http
            initialDelaySeconds: 5
            periodSeconds: 10
          livenessProbe:
            httpGet: *a2
            initialDelaySeconds: 15
            periodSeconds: 20
            failureThreshold: 3
          securityContext:
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            runAsNonRoot: true
            capabilities:
              drop:
                - ALL
          volumeMounts:
            - name: tmp
              mountPath: /tmp
      volumes:
        - name: tmp
          emptyDir: {}
      topologySpreadConstraints:
        - maxSkew: 1
          topologyKey: kubernetes.io/hostname
          whenUnsatisfiable: ScheduleAnyway
          labelSelector:
            matchLabels: *a1
---
apiVersion: v1
kind: Service
metadata:
  name: web
  namespace: shop
  labels: &a1
    app.kubernetes.io/name: web
spec:
  type: ClusterIP
  selector: *a1
  ports:
    - name: http
      port: 80
      targetPort: http
      protocol: TCP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: web
  namespace: shop
  labels:
    app.kubernetes.io/name: web
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt
spec:
  ingressClassName: nginx
  tls:
    - hosts:
        - shop.contoso.com
      secretName: web-tls
  rules:
    - host: shop.contoso.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: web
                port:
                  name: http
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: web
  namespace: shop
  labels:
    app.kubernetes.io/name: web
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: web
  minReplicas: 3
  maxReplicas: 10
  metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          type: Utilization
          averageUtilization: 70
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: web
  namespace: shop
  labels: &a1
    app.kubernetes.io/name: web
spec:
  minAvailable: 1
  selector:
    matchLabels: *a1
Apply
kubectl apply -f web.yaml --dry-run=server   # validate against the cluster first
kubectl apply -f web.yaml
kubectl -n shop rollout status deployment/web
kubectl -n shop get pods,svc,ingress,hpa -l app.kubernetes.io/name=web

Uses stable APIs (apps/v1, networking.k8s.io/v1, autoscaling/v2, policy/v1). The hardened settings need an image that runs as a non-root user and only writes to /tmp; adjust runAsUser if your image uses a different UID. Generated in your browser.

What it does

  • Everything an app needsNamespace, ConfigMap, Deployment, Service, Ingress with TLS, HorizontalPodAutoscaler and PodDisruptionBudget in one file.
  • Production defaultsReadiness and liveness probes, resource requests and limits, zero-downtime rolling updates and spreading across nodes.
  • HardenedOptional restricted Pod Security Standard: non-root user, read-only root filesystem, no privilege escalation, all capabilities dropped, seccomp.
  • Checked as you typeCatches invalid names, memory in “m” instead of Mi, limits below requests, an autoscaler without a CPU request and secrets in plain env vars.

How to use it

  1. Enter the app name, namespace, image and port
  2. Set resources and health checks
  3. Choose how it is exposed and scaled
  4. Download the YAML and apply it with a server-side dry run first

Questions people ask

Should I set CPU limits?

Opinions differ. CPU limits can throttle a pod even when the node has spare CPU, so many teams set CPU requests and memory limits but no CPU limit. Memory limits matter more, because one pod can otherwise exhaust a node.

Why doesn’t the Deployment have a replicas field?

When an autoscaler manages the Deployment, setting replicas as well makes every kubectl apply reset the count. The HorizontalPodAutoscaler’s min and max replicas take over.

Where should passwords go?

In a Kubernetes Secret, or better an external secrets store such as Azure Key Vault or AWS Secrets Manager via the Secrets Store CSI driver or External Secrets Operator, never in a ConfigMap.

Last updated 4 Dec 2026 · More in Infrastructure & Capacity

More Infrastructure & Capacity tools

See all →
Your product here. Reach IT engineers and architects who use these tools.Advertise →