Infra & Cloud yaml Intermediate

Kubernetes Deployment Manifest

Production-ready K8s Deployment with health checks, resource limits and rolling update strategy.

yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: myapp
spec:
  replicas: 3
  strategy:
    type: RollingUpdate
    rollingUpdate: { maxSurge: 1, maxUnavailable: 0 }
  template:
    spec:
      containers:
        - name: myapp
          image: myapp:latest
          resources:
            requests: { cpu: 100m, memory: 128Mi }
            limits:   { cpu: 500m, memory: 512Mi }
          livenessProbe:
            httpGet: { path: /health, port: 8080 }

Prerequisites

  • Kubernetes >= 1.26

Pro Tips

  • → Always set resource limits to prevent noisy neighbours.

Was this module useful?

Share your experience — it helps the team improve.

Leave Feedback

Commercial Licensing

Acquire a production access token or template license for enterprise deployment.

Module Info

Language
yaml
Level
Intermediate
Read time
5 min
Published
Dec 2024
License
Commercial License

Newsletter

New modules every week, directly to your inbox.