vm-console-proxy

command module
v0.0.0-...-2f1b7bc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

README

VM Console Proxy

Proxy that provides access to the VNC console of a Kubevirt VM.

It can generate time limited tokens that are then used to access VNC.

API

Generate a token

A temporary token can be generated using:

GET /api/v1alpha1/${VMI_NAMESPACE}/${VMI_NAME}/token

Where ${VMI_NAMESPACE} and ${VMI_NAME} are the namespace and name of a running VMI.

Parameters:

  • duration - Duration while the token is valid

Headers:

  • Authorization - Contains Bearer token that is used to check RBAC permissions to access /vnc subresource on a VMI
Access VNC

VNC can be accessed using websocket on this endpoint:

/api/v1alpha1/${VMI_NAMESPACE}/${VMI_NAME}/vnc

This subprotocol is used for authorization:

  • base64url.bearer.authorization.k8s.io.${TOKEN} - The ${TOKEN} is a token generated by the above endpoint.

Exposing the service

The Service is not exposed by default, because the Ingress configuration can depend on the cluster where it is running. For example this Ingress can be used:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: vm-console
  namespace: kubevirt
spec:
  rules:
    - host: ${HOSTNAME}
      http:
        paths:
          - backend:
              service:
                name: vm-console-proxy
                port:
                  number: 80
            path: /
            pathType: Prefix

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
pkg
tests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL