Code Monkey home page Code Monkey logo

vm-console-proxy's Introduction

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: 443
            path: /
            pathType: Prefix

vm-console-proxy's People

Contributors

akrejcir avatar codingben avatar kubevirt-bot avatar willymwai avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.