Skip to content

Commit f1db4ba

Browse files
committed
kubeadm-certs: fix wrong info about admin.conf
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.
1 parent ed4bb36 commit f1db4ba

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,14 +347,24 @@ CSRs requesting serving certificates for any IP or domain name.
347347

348348
## Generating kubeconfig files for additional users {#kubeconfig-additional-users}
349349

350-
During cluster creation, kubeadm signs the certificate in the `admin.conf` to have
351-
`Subject: O = system:masters, CN = kubernetes-admin`.
350+
During cluster creation, `kubeadm init` signs the certificate in the `super-admin.conf`
351+
to have `Subject: O = system:masters, CN = kubernetes-super-admin`.
352352
[`system:masters`](/docs/reference/access-authn-authz/rbac/#user-facing-roles)
353353
is a break-glass, super user group that bypasses the authorization layer (for example,
354-
[RBAC](/docs/reference/access-authn-authz/rbac/)).
355-
Sharing the `admin.conf` with additional users is **not recommended**!
354+
[RBAC](/docs/reference/access-authn-authz/rbac/)). The file `admin.conf` is also created
355+
by kubeadm on control plane nodes and it contains a certificate with
356+
`Subject: O = kubeadm:cluster-admins, CN = kubernetes-admin`. `kubeadm:cluster-admins`
357+
is a group logically belonging to kubeadm. If your cluster uses RBAC
358+
(the kubeadm default), the `kubeadm:cluster-admins` group is bound to the
359+
[`cluster-admin`](/docs/reference/access-authn-authz/rbac/#user-facing-roles) ClusterRole.
356360

357-
Instead, you can use the [`kubeadm kubeconfig user`](/docs/reference/setup-tools/kubeadm/kubeadm-kubeconfig)
361+
{{< warning >}}
362+
Avoid sharing the `super-admin.conf` or `admin.conf` files. Instead, create least
363+
privileged access even for people who work as administrators and use that least
364+
privilege alternative for anything other than break-glass (emergency) access.
365+
{{< /warning >}}
366+
367+
You can use the [`kubeadm kubeconfig user`](/docs/reference/setup-tools/kubeadm/kubeadm-kubeconfig)
358368
command to generate kubeconfig files for additional users.
359369
The command accepts a mixture of command line flags and
360370
[kubeadm configuration](/docs/reference/config-api/kubeadm-config.v1beta3/) options.

0 commit comments

Comments
 (0)