Skip to content

Commit 35bf7dc

Browse files
Audrey SpauldingAudrey Spaulding
authored andcommitted
CNV-34768
1 parent 23b4596 commit 35bf7dc

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

modules/virt-cluster-role-VNC.adoc

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+
// * virt/virtual_machines/virt-accessing-vm-consoles.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-cluster-role-VNC_{context}"]
7+
= Granting token generation permission for the VNC console by using the cluster role
8+
9+
As a cluster administrator, you can install a cluster role and bind it to a user or service account to allow access to the endpoint that generates tokens for the VNC console.
10+
11+
.Procedure
12+
13+
* Choose to bind the cluster role to either a user or service account.
14+
15+
** Run the following command to bind the cluster role to a user:
16+
+
17+
[source,terminal]
18+
----
19+
$ kubectl create rolebinding "${ROLE_BINDING_NAME}" --clusterrole="token.kubevirt.io:generate" --user="${USER_NAME}"
20+
----
21+
22+
** Run the following command to bind the cluster role to a service account:
23+
+
24+
[source,terminal]
25+
----
26+
$ kubectl create rolebinding "${ROLE_BINDING_NAME}" --clusterrole="token.kubevirt.io:generate" --serviceaccount="${SERVICE_ACCOUNT_NAME}"
27+
----

virt/virtual_machines/virt-accessing-vm-consoles.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ include::modules/virt-connecting-vm-virtctl.adoc[leveloffset=+2]
2727
include::modules/virt-temporary-token-VNC.adoc[leveloffset=+2]
2828
:!vnc-console:
2929

30+
:context: vnc-console
31+
include::modules/virt-cluster-role-VNC.adoc[leveloffset=+3]
32+
:!vnc-console:
33+
3034
[id="serial-console_virt-accessing-vm-consoles"]
3135
== Connecting to the serial console
3236

0 commit comments

Comments
 (0)