website icon indicating copy to clipboard operation
website copied to clipboard

Issue with k8s.io/docs/concepts/workloads/controllers/replicaset/

Open erkanerol opened this issue 7 years ago • 14 comments

This is a...

  • [ ] Feature Request
  • [ x] Bug Report

Problem: It seems replicasets use ownerReferences and they ignore the other's pod even the labels match their selector. There is nothing in the documentation regarding this.

Here is a stackoverflow issue: https://stackoverflow.com/questions/54172198/why-dont-two-kubernetes-replicasets-with-same-selector-conflict-with-each-other/54172659#54172659

Proposed Solution: Please state that replicasets ignore a pod if it belongs someone else.

Page to Update: https://kubernetes.io/...

erkanerol avatar Jan 13 '19 20:01 erkanerol

Hello,

Could you please assign it to me?

Thanks

SupriyaSirbi avatar Jan 21 '19 04:01 SupriyaSirbi

/assign @SupriyaSirbi

tengqm avatar Jan 21 '19 04:01 tengqm

@tengqm: GitHub didn't allow me to assign the following users: SupriyaSirbi.

Note that only kubernetes members and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time. For more information please see the contributor guide

In response to this:

/assign @SupriyaSirbi

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Jan 21 '19 04:01 k8s-ci-robot

@SupriyaSirbi Cannot assign it to you because you are not a kubernetes member. However, you can still work on it and propose a PR.

tengqm avatar Jan 21 '19 04:01 tengqm

Thanks for your support. I shall work on the same and propose a PR

SupriyaSirbi avatar Jan 21 '19 06:01 SupriyaSirbi

Hello @tengqm and @erkanerol

I am planning to update the docs with the following change. Please review and let me know if this is fine

Link:

Original : Note: For some API types, such as ReplicaSets, the label selectors of two instances must not overlap within a namespace, or the controller can see that as conflicting instructions and fail to determine how many replicas should be present.

Proposed Solution: Note: For some API types, such as ReplicaSets, the label selectors of two instances might overlap within a namespace. In this case , the controller can ignore a pod if it belongs someone else i.e having different metadata and spec fields in the namespace and create the replicas.

SupriyaSirbi avatar Jan 23 '19 07:01 SupriyaSirbi

Added Link https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

SupriyaSirbi avatar Jan 23 '19 07:01 SupriyaSirbi

Hi @SupriyaSirbi

I am not sure whether it should be stated in labels page or replicasets page. Since I have no holistic view of k8s documents, I cannot comment on it.

However, I believe there should be a statement like yours somewhere.

erkanerol avatar Jan 23 '19 07:01 erkanerol

@erkanerol Thanks for your suggestion

I came across the following the the replicaset page in "Pod Selector" section

https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/

Also you should not normally create any pods whose labels match this selector, either directly, with another ReplicaSet, or with another controller such as a Deployment. If you do so, the ReplicaSet thinks that it created the other pods. Kubernetes does not stop you from doing this.

If you do end up with multiple controllers that have overlapping selectors, you will have to manage the deletion yourself.

This internally means that the replicasets ignore a pod if it belongs someone else? Should i just add a statement here like this after the bold statement as

In this case , the controller can ignore a pod if it belongs someone else i.e having different metadata and spec fields in the namespace and create the replicas.

SupriyaSirbi avatar Jan 23 '19 07:01 SupriyaSirbi

Hello @tengqm I am not finding any reviewers for this issue.. This issue is open since last week. Could you please suggest any reviewers for the same?

SupriyaSirbi avatar Jan 29 '19 09:01 SupriyaSirbi

@SupriyaSirbi Since you have already assigned some reviewers, let's wait and see if we can get some comments.

tengqm avatar Jan 29 '19 09:01 tengqm

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot avatar Apr 30 '19 02:04 fejta-bot

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten

fejta-bot avatar May 30 '19 03:05 fejta-bot

@SupriyaSirbi I checked the doc. It seems fine. Thanks a lot!

erkanerol avatar Jun 02 '19 12:06 erkanerol