Kubespec Logo kubespec.dev

apps/v1

Namespaced Resource

Deployment

        Deployment enables declarative updates for Pods and ReplicaSets.
      

Click on Property Name to show the description, and Pink Types to expand schema.

Required properties are marked with *

Change History

Kubernetes v1.32

+2~81

Kubernetes v1.31

+7-1~38

Kubernetes v1.30

+7~19

Kubernetes v1.29

+16-1~4

Kubernetes v1.28

+3~24

Kubernetes v1.27

+3~9

Kubernetes v1.26

+7~5

Kubernetes v1.25

+4-3~6

Kubernetes v1.24

+1~112

Kubernetes v1.23

+10~75

Kubernetes v1.22

+8~30

Kubernetes v1.21

+13-1~10

Kubernetes v1.20

~4

Kubernetes v1.19

+6~18

Kubernetes v1.18

+1~18

Kubernetes v1.17

~13

Kubernetes v1.16

+12-4~11

Kubernetes v1.15

+6~10

Kubernetes v1.14

+6~7

Kubernetes v1.13

+1~2

Kubernetes v1.12

+3~11

Kubernetes v1.11

+6~5

Examples

There are 3 examples of Deployment that you can use as a starting point to create your own.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  namespace: shopping-cart # Deployment is a namespaced resource
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
        - name: nginx
          image: nginx:1.19.5
          ports:
            - containerPort: 80

Other useful resources