= Kubebox [small]#^⎈❏^#
Antonin Stefanutti https://github.com/astefanutti[@astefanutti]
// Meta
:description: CLI console for Kubernetes clusters
// Settings
:idprefix:
:idseparator: -
:experimental:
// Aliases
ifdef::env-github[]
:note-caption: :information_source:
:icon-edit: :pencil2:
endif::[]
ifndef::env-github[]
:icons: font
:icon-edit: icon:pencil[fw]
endif::[]
// URIs
:uri-kubebox-download: https://github.com/astefanutti/kubebox/releases/download/latest
:uri-kube-apiserver: https://kubernetes.io/docs/admin/kube-apiserver/
:uri-minikube: https://github.com/kubernetes/minikube
:uri-minishift: https://github.com/minishift/minishift
:uri-terminal-forever: http://www.commitstrip.com/en/2016/12/22/terminal-forever/
{description}
//image::https://astefanutti.github.io/kubebox/kubebox.gif[align="center"]
++++
++++
== Run
=== Executable
Download the Kubebox standalone executable for your OS:
--
[source,shell,subs=attributes+]
OSX
$ curl -Lo kubebox {uri-kubebox-download}/kubebox-macos && chmod +x kubebox
Linux
$ curl -Lo kubebox {uri-kubebox-download}/kubebox-linux && chmod +x kubebox
Windows
$ curl -Lo kubebox.exe {uri-kubebox-download}/kubebox-windows
=== Online
Kubebox is available online at http://kube.sh. Note that this requires this address to match the allowed origins for CORS by the API server.
This can be achived with the {uri-kube-apiserver}[Kubernetes API server CLI], e.g.:
$ kube-apiserver --cors-allowed-origins .*
In case you use {uri-minikube}[Minikube], this can be achieved with:
$ minikube start --extra-config=apiserver.GenericServerRunOptions.CorsAllowedOriginList=.*
Or if you use {uri-minishift}[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
=== 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/:/root/.kube/:ro astefanutti/kubebox
== Usage
{icon-edit}
== Commands
[cols="1v,2v"]
|===
|Keybinding |Description
|kbd:[n]
|Change current namespace
|kbd:[l], kbd:[CTRL+l]
|Login
|kbd:[<-], kbd:[->]
|Navigate screen
|kbd:[q], kbd:[CTRL+c]
|Exit
|===
== Terminal forever
//image::https://astefanutti.github.io/kubebox/terminal-forever.jpg[align="center", link={uri-terminal-forever}]
++++
++++