You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/concepts/workloads/controllers/deployment.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,24 +48,24 @@ The following is an example of a Deployment. It creates a ReplicaSet to bring up
48
48
In this example:
49
49
50
50
* A Deployment named `nginx-deployment` is created, indicated by the `.metadata.name` field.
51
-
* The Deployment creates three replicated Pods, indicated by the `replicas` field.
52
-
* The `selector` field defines how the Deployment finds which Pods to manage.
51
+
* The Deployment creates three replicated Pods, indicated by the `.spec.replicas` field.
52
+
* The `.spec.selector` field defines how the Deployment finds which Pods to manage.
53
53
In this case, you simply select a label that is defined in the Pod template (`app: nginx`).
54
54
However, more sophisticated selection rules are possible,
55
55
as long as the Pod template itself satisfies the rule.
56
56
{{< note >}}
57
-
The `matchLabels` field is a map of {key,value} pairs. A single {key,value} in the `matchLabels` map
57
+
The `.spec.selector.matchLabels` field is a map of {key,value} pairs. A single {key,value} in the `matchLabels` map
58
58
is equivalent to an element of `matchExpressions`, whose key field is "key" the operator is "In",
59
59
and the values array contains only "value".
60
60
All of the requirements, from both `matchLabels` and `matchExpressions`, must be satisfied in order to match.
61
61
{{< /note >}}
62
62
63
63
* The `template` field contains the following sub-fields:
64
-
* The Pods are labeled `app: nginx`using the `labels` field.
64
+
* The Pods are labeled `app: nginx`using the `.metadata.labels` field.
65
65
* The Pod template's specification, or `.template.spec` field, indicates that
66
66
the Pods run one container, `nginx`, which runs the `nginx`
67
67
[Docker Hub](https://hub.docker.com/) image at version 1.14.2.
68
-
* Create one container and name it `nginx` using the `name` field.
68
+
* Create one container and name it `nginx` using the `.spec.template.spec.containers[0].name` field.
69
69
70
70
Follow the steps given below to create the above Deployment:
71
71
@@ -517,7 +517,7 @@ Follow the steps given below to rollback the Deployment from the current version
517
517
518
518
The output is similar to this:
519
519
```
520
-
deployment.apps/nginx-deployment
520
+
deployment.apps/nginx-deployment rolled back
521
521
```
522
522
Alternatively, you can rollback to a specific revision by specifying it with `--to-revision`:
523
523
@@ -527,7 +527,7 @@ Follow the steps given below to rollback the Deployment from the current version
527
527
528
528
The output is similar to this:
529
529
```
530
-
deployment.apps/nginx-deployment
530
+
deployment.apps/nginx-deployment rolled back
531
531
```
532
532
533
533
For more details about rollout related commands, read [`kubectl rollout`](/docs/reference/generated/kubectl/kubectl-commands#rollout).
@@ -1024,7 +1024,7 @@ can create multiple Deployments, one for each release, following the canary patt
1024
1024
1025
1025
## Writing a Deployment Spec
1026
1026
1027
-
As with all other Kubernetes configs, a Deployment needs `apiVersion`, `kind`, and `metadata` fields.
1027
+
As with all other Kubernetes configs, a Deployment needs `.apiVersion`, `.kind`, and `.metadata` fields.
1028
1028
For general information about working with config files, see [deploying applications](/docs/tutorials/stateless-application/run-stateless-application-deployment/),
1029
1029
configuring containers, and [using kubectl to manage resources](/docs/concepts/overview/working-with-objects/object-management/) documents.
0 commit comments