Virtual Network Computing for EVE-k Apps

Introduction

Remote Console access to Virtual Machines (VMs) is not supported in EVE-K 16.0-LTS. You can use Virtual Network Computing (VNC) as a workaround instead.

This article explains how to access the VNC interface of applications running on EVE-k instances within ZEDEDA edge nodes. This process involves using the kubectl and virtctl command-line tools in conjunction with ZEDEDA Edge View.

Prerequisites

  • You have onboarded an edge node to your ZEDEDA project running EVE-k.
  • You have installed kubectl and virtctl on your local workstation.
  • You have access to the EdgeView script for the specific edge node.
  • You have installed VNC Client or VNC Viewer (for example: TigerVNC, RealVNC)

Restrictions

When accessing the cluster functionality within the edge node via VNC, kubectl and virtctl permissions are restricted to read-only operations for EVE applications. You can perform get and list operations, but you can’t perform apply or delete operations.

Download Kubeconfig

To interact with the EVE-k instance, you need to use EdgeView to set up a secure TCP session to the EVE-k edge node and then download the Kubernetes configuration file to your local workstation.

  1. Launch your local terminal.
  2. Run the EdgeView script with the tcp/kube command:

    #bash
    <edge_view.sh> tcp/kube
  3. The script downloads the kubeconfig.yaml file to your local directory (typically /tmp/download on Linux/macOS).

Use Virtctl to Access VNC

To access VNC, you need to use virtctl. You need the exact name of the VMI (for example, ztest-ubuntu-cd449) to pass into the virtctl command.

  1. List the Virtual Machine Instances (VMIs) running in the eve-kube-app namespace.
#bash
kubectl get vmi -n eve-kube-app --kubeconfig=kube-config.yaml

Example Output 

NAME                AGE PHASE IP NODENAME                READY
ztest-ubuntu-cd449  85m Running     hp-server-top-shelf-c9b3f   True
  1. Establish the connection to the app console.
#bash
virtctl console ztest-ubuntu-cd449 -n eve-kube-app --kubeconfig=kubeconfig.yaml

Example Output 

Successfully connected to ztest-ubuntu-cd449 console. The escape sequence is ^]
  1. Initiate a VNC session with the specified VMI.
#bash
virtctl vnc ztest-ubuntu-cd449 -n eve-kube-app --kubeconfig=kubeconfig.yaml

Example Output 

A VNC window is launched. 

Ubuntu 18.04.2 LTS ubuntu ttyS0
ubuntu login: ubuntu
Password:
Last login: Mon Sep 21 06:27:48 UTC 2020 from 10.1.0.1 on pts/1
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-117-generic x86_64)

(Optional) Create Aliases

Create aliases to shorten the path and file name for kubectl and virtctl, so you don’t have to type the full path each time.

Set up aliases

Add the following aliases to your shell configuration or run them in your current session:

#bash
alias k='kubectl --kubeconfig=<(/tmp/download/bin/edgeview-kube-decrypt.sh)'
alias v='virtctl --kubeconfig=<(/tmp/download/bin/edgeview-kube-decrypt.sh)'

Usage with aliases

After everything is defined, you can run commands using the short k and v syntax:

#bash
k get pod -n eve-kube-app
v vnc ztest-ubuntu-cd449 -n eve-kube-app
Was this article helpful?
0 out of 0 found this helpful