Use Deployment for the majority of stateless workloads.
Common cases:
- web applications
- internal APIs
- background workers that run continuously
- services exposed through
ServiceandIngress
- rolling updates
- replica-based scaling
- HPA and VPA compatibility
- service and ingress integration
- extra Services, headless Service mode, custom Ingress backends, and Gateway API HTTPRoutes
- support for sidecars, init containers, probes, and ConfigMaps
- optional Secrets, RBAC, NetworkPolicy, PodMonitor, PrometheusRule, and KEDA resources
- stable pod identity
- per-replica persistent identity
- one-pod-per-node placement
- use
workload.type: Deployment - define
serviceandingressonly when the app is actually network-facing - enable
hpaonly with meaningful metrics and sane requests - add
pdb.enabled=truefor production services with multiple replicas - use
topologySpreadConstraintsor anti-affinity for critical services - set
rollout.restartAtonly when you intentionally want to roll pods without another spec change
| Parameter | Description |
|---|---|
workload.type |
Must be Deployment |
replicaCount |
Number of replicas |
containers |
Main and sidecar containers |
service.* |
Service exposure |
ingress.* |
HTTP ingress exposure |
services[] |
Additional Service resources |
gatewayApi.* |
Optional Gateway API HTTPRoutes |
secrets[] / rbac.* / networkPolicy.* |
Opt-in security resources |
podMonitor.* / prometheusRule.* |
Prometheus Operator resources |
rollout.restartAt |
Explicit restart marker for intentional pod rollouts |
rollout.checksum.* |
ConfigMap/Secret checksum-driven rollouts |
hpa.* |
Horizontal autoscaling |
keda.* |
Event-driven autoscaling with KEDA CRDs |
pdb.* |
Disruption protection |
updateStrategy.* |
Rolling update behavior |
workload:
enabled: true
type: Deployment
replicaCount: 3
image:
repository: ghcr.io/example/api
tag: "1.2.0"
containers:
- name: app
ports:
- containerPort: 8080
service:
port: 80
targetPort: 8080
ingress:
enabled: true
hosts:
- host: api.example.com
paths:
- /
hpa:
enabled: true
minReplicas: 3
maxReplicas: 10
rollout:
restartAt: ""