Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubeadm-certs: fix wrong info about admin.conf #48095

Merged

Conversation

neolit123
Copy link
Member

While the super-admin.conf change was introduced, looks like we forgot to update this particular section of the kubeadm-certs.md.

https://kubernetes.io/docs/reference/setup-tools/kubeadm/implementation-details/#generate-kubeconfig-files-for-control-plane-components

The above section already has the right info.

@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Sep 26, 2024
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 26, 2024
@neolit123
Copy link
Member Author

/cc @SataQiu @pacoxu for LGTM
/sig cluster-lifecycle

@k8s-ci-robot k8s-ci-robot added the sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. label Sep 26, 2024
@k8s-ci-robot k8s-ci-robot requested a review from pacoxu September 26, 2024 10:13
@k8s-ci-robot
Copy link
Contributor

@neolit123: GitHub didn't allow me to request PR reviews from the following users: for, LGTM.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @SataQiu @pacoxu for LGTM
/sig cluster-lifecycle

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-sigs/prow repository.

@neolit123
Copy link
Member Author

/kind bug
/triage accepted

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Sep 26, 2024
Copy link

netlify bot commented Sep 26, 2024

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit fa074af
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/66f5547f106bea00085dba30
😎 Deploy Preview https://deploy-preview-48095--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@pacoxu pacoxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be cherry-picked to 1.31 and 1.30? I am not familiar with website cherry pick policy.

Link to kubernetes/kubeadm#2414.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 26, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 355f73e373d5419f1bd3a67ea9963efacc476f35

Copy link
Member

@SataQiu SataQiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

But, I'd use a callout for the security warning.

is a kubeadm managed group bound to the
[`cluster-admin`]((/docs/reference/access-authn-authz/rbac/#user-facing-roles)) ClusterRole.

Sharing the `super-admin.conf` or `admin.conf` with additional users is **not recommended**!
Copy link
Contributor

@sftim sftim Sep 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Sharing the `super-admin.conf` or `admin.conf` with additional users is **not recommended**!
{{< warning >}}
Avoid sharing the `super-admin.conf` or `admin.conf` files; instead, create least privileged access
- even for people who work as administrators - and use that least privilege alternative for anything
other than break-glass (emergency) access.
{{< /warning >}}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated.

@neolit123 neolit123 force-pushed the 1.32-fix-wrong-info-about-admin.conf branch from 9e90107 to a9bd810 Compare September 26, 2024 11:19
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 26, 2024
@neolit123
Copy link
Member Author

@sftim updated.

@pacoxu

Should this be cherry-picked to 1.31 and 1.30? I am not familiar with website cherry pick policy.

me neither.

@dipesh-rawat
Copy link
Member

Should this be cherry-picked to 1.31 and 1.30? I am not familiar with website cherry pick policy.

This PR will update the doc for the current latest release (1.31) since it's targeting the main branch. If we also need to update the doc for v1.30 or any other release, we’ll need to create a separate pull request targeting the release-1.30 or release-1.xx branch.

While the super-admin.conf change was introduced, looks like
we forgot to update this particular section of the kubeadm-certs.md.

https://kubernetes.io/docs/reference/setup-tools/kubeadm/implementation-details/#generate-kubeconfig-files-for-control-plane-components

The above section already has the right info.
@neolit123 neolit123 force-pushed the 1.32-fix-wrong-info-about-admin.conf branch from a9bd810 to fa074af Compare September 26, 2024 12:33
@neolit123
Copy link
Member Author

neolit123 commented Sep 26, 2024

Should this be cherry-picked to 1.31 and 1.30? I am not familiar with website cherry pick policy.

This PR will update the doc for the current latest release (1.31) since it's targeting the main branch. If we also need to update the doc for v1.30 or any other release, we’ll need to create a separate pull request targeting the release-1.30 or release-1.xx branch.

ok, once this merges i can send cherry pick for release-1.30
EDIT: and 1.29
kubernetes/kubernetes#121305

Copy link
Member

@dipesh-rawat dipesh-rawat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dipesh-rawat, pacoxu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 26, 2024
@neolit123
Copy link
Member Author

looking for another LGTM.
thanks

@pacoxu
Copy link
Member

pacoxu commented Sep 26, 2024

/lgtm
since Tim's comment is addressed.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 26, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 6843dcb0cac2f7440e9329958b21cc49cf3eb32a

@k8s-ci-robot k8s-ci-robot merged commit 3e5e73e into kubernetes:main Sep 26, 2024
6 checks passed
@neolit123
Copy link
Member Author

neolit123 commented Sep 26, 2024

Comment on lines +358 to +359
`Subject: O = kubeadm:cluster-admins, CN = kubernetes-admin`. `kubeadm:cluster-admins`
is a group logically belonging to kubeadm. If your cluster uses RBAC
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this mean? kubeadm is a CLI tool. Why there is a group belonging to a tool?

kubeadm:cluster-admins is a group logically belonging to kubeadm.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "kubeadm:cluster-admins is a group logically belonging to kubeadm" statement is confusing. You can say that this group is created and used by kubeadm. Having a group belonging to a CLI tool is confusing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

group is a term from rbac.

{{< warning >}}
Avoid sharing the `super-admin.conf` or `admin.conf` files. Instead, create least
privileged access even for people who work as administrators and use that least
privilege alternative for anything other than break-glass (emergency) access.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. Please state what "least privilege alternative" means. Or else, this suggestion is not actionable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sftim suggested this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants