Skip to content

Commit db27cfd

Browse files
authored
Update deployment.md - Fix inconsistency and rollback message
- Fix inconsistency with configuration field references - Fix message returns after performing a roll-back...
1 parent bc4bc85 commit db27cfd

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

@@ -510,7 +510,7 @@ Follow the steps given below to rollback the Deployment from the current version
510510
511511
The output is similar to this:
512512
```
513-
deployment.apps/nginx-deployment
513+
deployment.apps/nginx-deployment rolled back
514514
```
515515
Alternatively, you can rollback to a specific revision by specifying it with `--to-revision`:
516516
@@ -520,7 +520,7 @@ Follow the steps given below to rollback the Deployment from the current version
520520
521521
The output is similar to this:
522522
```
523-
deployment.apps/nginx-deployment
523+
deployment.apps/nginx-deployment rolled back
524524
```
525525
526526
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
10171017

10181018
## Writing a Deployment Spec
10191019

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

0 commit comments

Comments
 (0)