Skip to content

Commit

Permalink
Updated Deployment concept docs (#6494)
Browse files Browse the repository at this point in the history
* Updated Deployment concept docs

* Addressed comments
  • Loading branch information
liyinan926 authored and zacharysarah committed Dec 1, 2017
1 parent d25b422 commit 559912c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/concepts/workloads/controllers/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ It is generally discouraged to make label selector updates and it is suggested t
In any case, if you need to perform a label selector update, exercise great caution and make sure you have grasped
all of the implications.

**Note:** In API version `apps/v1beta2`, a Deployment's label selector is immutable after it gets created.
**Note:** In API version `apps/v1`, a Deployment's label selector is immutable after it gets created.
{: .note}

* Selector additions require the pod template labels in the Deployment spec to be updated with the new label too,
Expand Down Expand Up @@ -863,7 +863,7 @@ for the Pods targeted by this deployment.

`.spec.selector` must match `.spec.template.metadata.labels`, or it will be rejected by the API.

In API version `apps/v1beta2`, `.spec.selector` and `.metadata.labels` no longer default to `.spec.template.metadata.labels` if not set. So they must be set explicitly. Also note that `.spec.selector` is immutable after creation of the Deployment in `apps/v1beta2`.
In API version `apps/v1`, `.spec.selector` and `.metadata.labels` do not default to `.spec.template.metadata.labels` if not set. So they must be set explicitly. Also note that `.spec.selector` is immutable after creation of the Deployment in `apps/v1`.

A Deployment may terminate Pods whose labels match the selector if their template is different
from `.spec.template` or if the total number of such Pods exceeds `.spec.replicas`. It brings up new
Expand Down Expand Up @@ -937,7 +937,7 @@ a Pod is considered ready, see [Container Probes](/docs/concepts/workloads/pods/

### Rollback To

Field `.spec.rollbackTo` has been deprecated in API versions `extensions/v1beta1` and `apps/v1beta1`, and is no longer supported in API version `apps/v1beta2`. Instead, `kubectl rollout undo` as introduced in [Rolling Back to a Previous Revision](#rolling-back-to-a-previous-revision) should be used.
Field `.spec.rollbackTo` has been deprecated in API versions `extensions/v1beta1` and `apps/v1beta1`, and is no longer supported in API versions starting `apps/v1beta2`. Instead, `kubectl rollout undo` as introduced in [Rolling Back to a Previous Revision](#rolling-back-to-a-previous-revision) should be used.

### Revision History Limit

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/workloads/controllers/nginx-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1beta2 # for versions before 1.8.0 use apps/v1beta1
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: nginx-deployment
Expand Down

0 comments on commit 559912c

Please sign in to comment.