⎈❏ Terminal console for Kubernetes clusters
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.adoc

Kubebox ⎈❏

Terminal console for Kubernetes clusters

Try

Choose one of the following alternatives (follow the links for detailed instructions):

Standalone Client Executable

In-cluster Client
$ kubectl run kubebox -it --rm --image=astefanutti/kubebox --restart=Never

Docker Client
$ docker run -it --rm -v ~/.kube/:/home/node/.kube/:ro astefanutti/kubebox

Web Server
$ kubectl create -f https://raw.github.com/astefanutti/kubebox/master/kubernetes.yaml

Web Client
https://astefanutti.github.com/kubebox

Features

Done Plan
  • Configuration sourcing from kubeconfig files (KUBECONFIG environment variable or $HOME/.kube)

  • Login and OAuth authentication support

  • Namespace selection

  • Pods list watching

  • Pod / container log watching

  • Container resources usage (memory, CPU, network charts) [1]

  • Container remote exec terminal


1. Currently requires priviledged access / role.
  • CRUD configuration operations

  • Cluster and node views

  • Cluster monitoring

Run

The following alternatives are available for you to use Kubebox, depending on your preferences and constraints.

Executable

Download the Kubebox standalone executable for your OS:

# OSX
$ curl -Lo kubebox https://github.com/astefanutti/kubebox/releases/download/v0.2.1/kubebox-macos && chmod +x kubebox
# Linux
$ curl -Lo kubebox https://github.com/astefanutti/kubebox/releases/download/v0.2.1/kubebox-linux && chmod +x kubebox
# Windows
$ curl -Lo kubebox.exe https://github.com/astefanutti/kubebox/releases/download/v0.2.1/kubebox-windows

Server

Kubebox can be served from a service deployed in the target Kubernetes cluster. Terminal emulation is provided by Xterm.js and the communication with the Kubernetes master API is proxied by the server.

Kubernetes

# Replace the ROUTE_HOSTNAME variable
$ kubectl create -f https://raw.github.com/astefanutti/kubebox/master/kubernetes.yaml

In order for the Ingress resource to work, the cluster must have an Ingress controller running. See Ingress controllers for more information. In case you use Minikube, this can be achieved with:

$ minikube addons enable ingress

OpenShift

$ oc new-app -f https://raw.github.com/astefanutti/kubebox/master/openshift.yaml

Docker

You can run Kubebox using Docker, e.g.:

$ docker run -it --rm astefanutti/kubebox

You may want to mount your home directory so that Kubebox can rely on the ~/.kube/config file, e.g.:

$ docker run -it --rm -v ~/.kube/:/home/node/.kube/:ro astefanutti/kubebox

Online

Kubebox is available online at https://astefanutti.github.com/kubebox. Note that this requires this address to match the allowed origins for CORS by the API server. This can be achived with the Kubernetes API server CLI, e.g.:

$ kube-apiserver --cors-allowed-origins .*

In case you use Minikube, this can be achieved with:

$ minikube start --extra-config=apiserver.GenericServerRunOptions.CorsAllowedOriginList=.*

See Configuring Kubernetes for more information.

Or if you use Minishift:

$ minishift openshift config set --patch '{"corsAllowedOrigins": [".*"]}'

NPM

Install Kubebox globally and run it:

$ npm install -g kubebox
$ kubebox

Or locally:

$ npm install kubebox
$ `npm bin`/kubebox

Commands

Keybinding Description

General

l, CTRL+l
Login
,
Navigate screens
,
Navigate list / form / log
Enter
Select item / submit form
ESC
Close modal window / cancel form / rewind focus
q, CTRL+c
Exit [2]

Login

,
Navigate Kube configurations

Namespace

n
Change current namespace
r
Remote shell into container
m
Memory usage
c
CPU usage
t
Network usage

Log

g, SHIFT+g
Move to top / bottom
CTRL+u, CTRL+d
Move one page up / down

Usage

✏️

Development

$ git clone https://github.com/astefanutti/kubebox.git
$ cd kubebox
$ npm install
$ node index.js

Terminal forever


2. Not available in Web versions.