Kubernetes Deployment Manifest
Jump to navigation
Jump to search
External
Internal
Overview
Example
apiVersion: apps/v1 kind: Deployment metadata: name: archaeopteryx labels: color: blue spec: replicas: 1 selector: matchLabels: function: 'builder' strategy: revisionHistoryLimit: progressDeadlineSeconds: template:
.spec Elements
replicas
Specifies the number of desired pods. Defaults to 1.
selector
Specifies the label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.
strategy
Specifies the deployment strategy to use to replace existing pods with new ones.
revisionHistoryLimit
The number of old ReplicaSets to retain to allow rollback. Defaults to 10.