Skip to content

Commit 2065e32

Browse files
authored
Merge pull request #14268 from huffmanca/BZ1693408
BZ-1693408: Consolidated references to the kubeadmin user.
2 parents 9d37d17 + 4693ced commit 2065e32

8 files changed

+68
-10
lines changed

_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ Topics:
243243
File: configuring-oidc-identity-provider
244244
- Name: Using RBAC to define and apply permissions
245245
File: using-rbac
246+
- Name: Removing the kubeadmin user
247+
File: remove-kubeadmin
246248
- Name: Configuring LDAP failover
247249
File: configuring-ldap-failover
248250
- Name: Configuring the user agent

authentication/remove-kubeadmin.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[id="removing-kubeadmin"]
2+
= Removing the kubeadmin user
3+
include::modules/common-attributes.adoc[]
4+
:context: removing-kubeadmin
5+
toc::[]
6+
7+
include::modules/authentication-kubeadmin.adoc[leveloffset=+1]
8+
9+
include::modules/authentication-remove-kubeadmin.adoc[leveloffset=+1]

authentication/understanding-authentication.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,4 @@ include::modules/oauth-token-requests.adoc[leveloffset=+2]
2525

2626
include::modules/authentication-api-impersonation.adoc[leveloffset=+3]
2727

28-
2928
include::modules/authentication-prometheus-system-metrics.adoc[leveloffset=+3]

modules/authentication-kubeadmin.adoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Module included in the following assmeblies:
2+
//
3+
// * authentication/removing-kubeadmin.adoc
4+
5+
[id="understanding-kubeadmin-{context}"]
6+
= The kubeadmin user
7+
8+
{product-title} creates a cluster administrator, `kubeadmin`, after the
9+
installation process completes.
10+
11+
This user has the `cluster-admin` role automatically applied and is treated
12+
as the root user for the cluster. The password is dynamically generated
13+
and unique to your {product-title} environment. After installation
14+
completes the password is provided in the installation program's output.
15+
For example:
16+
17+
----
18+
INFO Install complete!
19+
INFO Run 'export KUBECONFIG=<your working directory>/auth/kubeconfig' to manage the cluster with 'oc', the OpenShift CLI.
20+
INFO The cluster is ready when 'oc login -u kubeadmin -p <provided>' succeeds (wait a few minutes).
21+
INFO Access the OpenShift web-console here: https://console-openshift-console.apps.demo1.openshift4-beta-abcorp.com
22+
INFO Login to the console with user: kubeadmin, password: <provided>
23+
----
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * authentication/understanding-authentication.adoc
4+
5+
[id="removing-kubeadmin-{context}"]
6+
= Removing the kubeadmin user
7+
8+
After you define an identity provider and create a new `cluster-admin`
9+
user, you can remove the `kubeadmin` to improve cluster security.
10+
11+
WARNING
12+
====
13+
If you follow this procedure before another user is a `cluster-admin`,
14+
then {product-title} must be reinstalled. It is not possible to undo
15+
this command.
16+
====
17+
18+
.Prerequisites
19+
20+
* You must have configured at least one identity provider.
21+
* You must have added the `cluster-admin` role to a user.
22+
* You must be logged in as an administrator.
23+
24+
.Procedure
25+
26+
* Remove the `kubeadmin` secrets:
27+
+
28+
----
29+
$ oc delete secrets kubeadmin -n kube-system
30+
----
31+

modules/identity-provider-add.adoc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,10 @@ users can authenticate.
2222

2323
* Create an {product-title} cluster.
2424
* Create the Custom Resource (CR) for your identity providers.
25+
* You must be logged in as an administrator.
2526

2627
.Procedure
2728

28-
. Log in to the cluster as the `kube-admin` user, entering the password
29-
when prompted:
30-
+
31-
----
32-
$ oc login -u kubeadmin
33-
----
34-
3529
. Apply the defined CR:
3630
+
3731
----

modules/identity-provider-overview.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
[id="identity-provider-overview-{context}"]
1717
= About identity providers in {product-title}
1818

19-
By default, only a `kube-admin` user exists on your cluster. To specify an
19+
By default, only a `kubeadmin` user exists on your cluster. To specify an
2020
identity provider, you must create a Custom Resource (CR) that describes
2121
that identity provider and add it to the cluster.
2222

modules/rbac-users.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ with the `User` object. Examples: `joe` `alice`
2727
is defined, mainly for the purpose of enabling the infrastructure to
2828
interact with the API securely. They include a cluster administrator
2929
(with access to everything), a per-node user, users for use by routers
30-
and registries, and various others. Finally, there is an `anonymous
30+
and registries, and various others. Finally, there is an `anonymous`
3131
system user that is used by default for unauthenticated requests. Examples:
3232
`system:admin` `system:openshift-registry` `system:node:node1.example.com`
3333

0 commit comments

Comments
 (0)