Skip to content

Clarify docs around node self-labelling restriction #31992

Open
@sftim

Description

@sftim

This is a Bug Report

Problem:
Issue #31972 and the related PR documented that setting the label
node-role.kubernetes.io/control-plane is a privileged operation, and that nodes cannot set that label themselves.

I'm concerned about the sentence:

The admission controller documentation covers what labels are permitted to be used with the kubelet --node-labels option.

in https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/

  1. Rather than refer to documentation in plain text, it's better to either hyperlink to that documentation or to summarize it. I would use an inline hyperlink here; it may not otherwise be obvious to all readers where they can find that documentation.
  2. The documentation for NodeRestriction may accurate but even if so, it is hard to follow. It could use an update, and especially so now that we're referring readers there.
  3. There's ambiguity with the language about whether we're calling labels “restricted” or “reserved”. According to the documentation for NodeRestriction (the admission controller), kubelets can label themselves as node-role.kubernetes.io/control-plane on themselves, but that a future version of Kubernetes may disallow this. However, https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/ implies that a kubelet is forbidden from setting that label on its Node object.

Proposed Solution:
Update those pages to be clear about the behavior and about which labels the kubelet can / can't / might be allowed to set.

Pages to Update:
https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/
https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/

Kubernetes Version:
v1.23 (at the time of filing)

Additional Information:

/language en
/kind bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.language/enIssues or PRs related to English languagelifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.priority/backlogHigher priority than priority/awaiting-more-evidence.sig/authCategorizes an issue or PR as relevant to SIG Auth.sig/cluster-lifecycleCategorizes an issue or PR as relevant to SIG Cluster Lifecycle.

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions