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
@@ -510,7 +510,7 @@ Follow the steps given below to rollback the Deployment from the current version
510
510
511
511
The output is similar to this:
512
512
```
513
-
deployment.apps/nginx-deployment
513
+
deployment.apps/nginx-deployment rolled back
514
514
```
515
515
Alternatively, you can rollback to a specific revision by specifying it with `--to-revision`:
516
516
@@ -520,7 +520,7 @@ Follow the steps given below to rollback the Deployment from the current version
520
520
521
521
The output is similar to this:
522
522
```
523
-
deployment.apps/nginx-deployment
523
+
deployment.apps/nginx-deployment rolled back
524
524
```
525
525
526
526
For more details about rollout related commands, read [`kubectl rollout`](/docs/reference/generated/kubectl/kubectl-commands#rollout).
@@ -1017,7 +1017,7 @@ can create multiple Deployments, one for each release, following the canary patt
1017
1017
1018
1018
## Writing a Deployment Spec
1019
1019
1020
-
As with all other Kubernetes configs, a Deployment needs `apiVersion`, `kind`, and `metadata` fields.
1020
+
As with all other Kubernetes configs, a Deployment needs `.apiVersion`, `.kind`, and `.metadata` fields.
1021
1021
For general information about working with config files, see [deploying applications](/docs/tutorials/stateless-application/run-stateless-application-deployment/),
1022
1022
configuring containers, and [using kubectl to manage resources](/docs/concepts/overview/working-with-objects/object-management/) documents.
0 commit comments