File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,9 @@ kubectl get vms -n kube-gateway
138
138
Now that the virtual machine is running, we can create a signed link to kubevirt noVNC server.
139
139
140
140
``` 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
+
141
144
# Sign a token and put it in a variable
142
145
data=' {"URLs":["/apis/subresources.kubevirt.io/v1/namespaces/kube-gateway/virtualmachineinstances/testvm/vnc"],"duration":"1h"}'
143
146
token=$( cat token) # Use a k8s token that can access the private key for signing the JWT
You can’t perform that action at this time.
0 commit comments