Revamped concepts doc for ReplicaSet#5396
Revamped concepts doc for ReplicaSet#5396liyinan926 wants to merge 2 commits intokubernetes:masterfrom
Conversation
|
Deploy preview ready! Built with commit 51a1507 https://deploy-preview-5396--kubernetes-io-master-staging.netlify.com |
|
/assign @kow3ns |
kow3ns
left a comment
There was a problem hiding this comment.
Just a few comments, but over all it looks awesome.
| ## ReplicaSet as an Horizontal Pod Autoscaler target | ||
| ## Writing a ReplicaSet Spec | ||
|
|
||
| As with all other Kubernetes config, a ReplicaSet needs the `apiVersion`, `kind`, and `metadata` fields. For |
| ## Writing a ReplicaSet Spec | ||
|
|
||
| As with all other Kubernetes config, a ReplicaSet needs the `apiVersion`, `kind`, and `metadata` fields. For | ||
| general information about working with config files, see [here](/docs/user-guide/simple-yaml/), |
| For local container restarts, ReplicaSet delegate to an agent on the node, | ||
| for example the [Kubelet](/docs/admin/kubelet/) or Docker. | ||
|
|
||
| ### Pod Selector |
There was a problem hiding this comment.
You should consider adding a paragraph that indicates that, in Kuberentes 1.8 and later, selectors are no longer defaulted and are immutable after creation.
| between pods that it created or deleted and pods that another person or process created or | ||
| deleted. This allows the ReplicaSet to be replaced without affecting the running pods. | ||
|
|
||
| The `.spec.template.metadata.labels` must be equal to the `.spec.selector`, or it will |
There was a problem hiding this comment.
:s/must be equal to/must match/g
| be rejected by the API. | ||
|
|
||
| Also you should not normally create any pods whose labels match this selector, either directly, with | ||
| another ReplicaSet, or with another controller such as Job. If you do so, the ReplicaSet thinks that it |
There was a problem hiding this comment.
I wouldn't call out Job here because of the way selectors work for Job
| kubectl autoscale rs frontend | ||
| ``` | ||
|
|
||
| ## Alternatives to ReplicaSet |
There was a problem hiding this comment.
Is there any reason why StatefulSet is left out in this section?
There was a problem hiding this comment.
StatefulSet is for stateful applications that have very different requirements than those of stateless applications, which ReplicaSet and the alternatives can potentially handle.
|
/lgtm |
|
Reviewed 1 of 2 files at r1, 1 of 1 files at r2. Comments from Reviewable |
|
Replaced by #5463. Closing. |
This PR updated the concept doc for ReplicaSet. A few new sections were added, similarly to what the concepts docs for other workloads controllers have. This is a part of broader efforts to enhance the workloads controller docs. The corresponding example ReplicaSet YAML file was also updated to reflect the removal of selector defaulting for apps/v1beta2 in kubernetes/kubernetes#50164.
This change is