Skip to content

Commit ebf3d17

Browse files
authored
Merge pull request #20292 from rwanyoike/patch-1
Update deployment.md - Fix inconsistency and rollback message
2 parents 9d09e8c + db27cfd commit ebf3d17

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

content/en/docs/concepts/workloads/controllers/deployment.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,24 @@ The following is an example of a Deployment. It creates a ReplicaSet to bring up
4848
In this example:
4949

5050
* 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.
5353
In this case, you simply select a label that is defined in the Pod template (`app: nginx`).
5454
However, more sophisticated selection rules are possible,
5555
as long as the Pod template itself satisfies the rule.
5656
{{< 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
5858
is equivalent to an element of `matchExpressions`, whose key field is "key" the operator is "In",
5959
and the values array contains only "value".
6060
All of the requirements, from both `matchLabels` and `matchExpressions`, must be satisfied in order to match.
6161
{{< /note >}}
6262

6363
* 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.
6565
* The Pod template's specification, or `.template.spec` field, indicates that
6666
the Pods run one container, `nginx`, which runs the `nginx`
6767
[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.
6969

7070
Follow the steps given below to create the above Deployment:
7171

@@ -517,7 +517,7 @@ Follow the steps given below to rollback the Deployment from the current version
517517
518518
The output is similar to this:
519519
```
520-
deployment.apps/nginx-deployment
520+
deployment.apps/nginx-deployment rolled back
521521
```
522522
Alternatively, you can rollback to a specific revision by specifying it with `--to-revision`:
523523
@@ -527,7 +527,7 @@ Follow the steps given below to rollback the Deployment from the current version
527527
528528
The output is similar to this:
529529
```
530-
deployment.apps/nginx-deployment
530+
deployment.apps/nginx-deployment rolled back
531531
```
532532
533533
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
10241024

10251025
## Writing a Deployment Spec
10261026

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.
10281028
For general information about working with config files, see [deploying applications](/docs/tutorials/stateless-application/run-stateless-application-deployment/),
10291029
configuring containers, and [using kubectl to manage resources](/docs/concepts/overview/working-with-objects/object-management/) documents.
10301030
The name of a Deployment object must be a valid

0 commit comments

Comments
 (0)