Skip to content

Commit 45b45cf

Browse files
authored
Merge pull request #57135 from xenolinux/create-sa-token
OCPBUGS#9364: Create bound SA tokens externally
2 parents 53cc08b + b8f974f commit 45b45cf

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

authentication/bound-service-account-tokens.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,14 @@ include::modules/bound-sa-tokens-about.adoc[leveloffset=+1]
1414
// Configuring bound service account tokens using volume projection
1515
include::modules/bound-sa-tokens-configuring.adoc[leveloffset=+1]
1616

17+
// Creating bound service account tokens outside the pod
18+
include::modules/bound-sa-tokens-configuring-externally.adoc[leveloffset=+1]
19+
1720
[role="_additional-resources"]
1821
.Additional resources
1922

2023
* xref:../nodes/nodes/nodes-nodes-rebooting.adoc#nodes-nodes-rebooting-gracefully_nodes-nodes-rebooting[Rebooting a node gracefully]
2124
25+
* xref:../authentication/understanding-and-creating-service-accounts.adoc#service-accounts-managing_understanding-service-accounts[Creating service accounts]
26+
2227
// TODO: Verify distros: openshift-enterprise,openshift-webscale,openshift-origin
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * authentication/bound-service-account-tokens.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="bound-sa-tokens-configuring-externally_{context}"]
7+
= Creating bound service account tokens outside the pod
8+
9+
.Prerequisites
10+
11+
* You have access to the cluster as a user with the `cluster-admin` role.
12+
* You have created a service account. This procedure assumes that the service account is named `build-robot`.
13+
14+
.Procedure
15+
16+
* Create the bound service account token outside the pod by running the following command:
17+
+
18+
[source,terminal]
19+
----
20+
$ oc create token build-robot
21+
----
22+
+
23+
.Example output
24+
[source,terminal]
25+
----
26+
eyJhbGciOiJSUzI1NiIsImtpZCI6IkY2M1N4MHRvc2xFNnFSQlA4eG9GYzVPdnN3NkhIV0tRWmFrUDRNcWx4S0kifQ.eyJhdWQiOlsia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