Skip to content

Commit c35e77f

Browse files
author
yzamir
committed
add readme
1 parent 1f95719 commit c35e77f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ kubectl get vms -n kube-gateway
138138
Now that the virtual machine is running, we can create a signed link to kubevirt noVNC server.
139139

140140
``` bash
141+
# Copy the service account bearer token into a local file
142+
kubectl get secrets -n kube-gateway -o json | jq '[.items[] | select(.metadata.name | contains("kube-gateway-sa")) | select(.type | contains("service-account-token")) | .data.token][0]' | python -m base64 -d > token
143+
141144
# Sign a token and put it in a variable
142145
data='{"URLs":["/apis/subresources.kubevirt.io/v1/namespaces/kube-gateway/virtualmachineinstances/testvm/vnc"],"duration":"1h"}'
143146
token=$(cat token) # Use a k8s token that can access the private key for signing the JWT

0 commit comments

Comments
 (0)