1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00

CNV-34768

This commit is contained in:
Audrey Spaulding
2024-05-16 16:15:05 -04:00
committed by openshift-cherrypick-robot
parent 5a9a83685f
commit 77ac601c38
2 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
// Module included in the following assemblies:
//
// * virt/virtual_machines/virt-accessing-vm-consoles.adoc
:_mod-docs-content-type: PROCEDURE
[id="virt-cluster-role-VNC_{context}"]
= Granting token generation permission for the VNC console by using the cluster role
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.
.Procedure
* Choose to bind the cluster role to either a user or service account.
** Run the following command to bind the cluster role to a user:
+
[source,terminal]
----
$ kubectl create rolebinding "${ROLE_BINDING_NAME}" --clusterrole="token.kubevirt.io:generate" --user="${USER_NAME}"
----
** Run the following command to bind the cluster role to a service account:
+
[source,terminal]
----
$ kubectl create rolebinding "${ROLE_BINDING_NAME}" --clusterrole="token.kubevirt.io:generate" --serviceaccount="${SERVICE_ACCOUNT_NAME}"
----

View File

@@ -27,6 +27,10 @@ include::modules/virt-connecting-vm-virtctl.adoc[leveloffset=+2]
include::modules/virt-temporary-token-VNC.adoc[leveloffset=+2]
:!vnc-console:
:context: vnc-console
include::modules/virt-cluster-role-VNC.adoc[leveloffset=+3]
:!vnc-console:
[id="serial-console_virt-accessing-vm-consoles"]
== Connecting to the serial console