KubeTerminal

KubeTerminal
KubeTerminal

Usage

The very first thing is to get kubectl and access Kubernetes.

Execute KubeTerminal

KubeTerminal
KubeTerminal
  • The resource-window show list of pods in selected or all namespaces. If pod is ‘Running’, line color is green and if not ‘Running’ the line is either yellow or red. Quick and easy way to see status of all pods.
  • The output-window shows help including keybindings and commands.
  • TAB is used to change window and refresh the resource-window.
  • <alt-g> is used to go to the end of the output-window.
  • <alt-u> and <alt-j> are used to move one line up/down in the resource-window.
  • <alt-i> and <alt-k> are used to move page up/down in the resource-window.
  • <alt-o> and <alt-l> are used to move page up/down in the output-window.
  • Cursor-keys inside the window work also but using keybindings to scroll can be done from any window.

Describe pod and see logs

Describe any pod
  • Move cursor in resource-window and press <alt-d> to show description of the selected resource. kubectl describe command is used here.
  • <alt-y> shows YAML of the selected resource.
  • TAB to command-window and enter ‘json’ and it would should JSON of the selected resource.
Pod logs
  • <alt-shift-l> or logs-command shows logs of currently selected pod.
  • If pod has many containers, use ‘logs -c <container name>’ to show logs of the container.
  • If a line in the output-window includes string ‘error’ then that line is shown in red.
  • ‘delete’-command would kill the selected pod and if pod is controlled by ReplicaSet or other resource, Kubernetes will restart the pod.

Secrets and ConfigMaps

Secrets and values
  • When showing Secrets, or ConfigMaps, ‘decode’-command decodes base64-value of secret/configmap data.

Other resources

Services resources
  • ‘window’-command shows available windows and their keybindings.
  • For example, <alt-2> or ‘window svc’ shows services in the selected namespace.
  • <alt-d> or ‘describe’, ‘yaml’ and ‘json’ commands work for all resources.
Service YAML

Some other commands

  • ‘cert’-command in Secrets-window shows certificate using OpenSSL.
  • ‘clip’-command copies all text in output-window to clipboard. Very useful to get YAML, logs or other info and share it with support etc.
  • ‘cls’-command clears the output-window.
  • ‘exec’-command executes a command in selected pod. For example: ‘exec whoami’.
  • ‘shell’-command executes given command and shows output in the output-window. For example: ‘shell pwd’ would show current directory.
  • ‘save’-command saves all text in output-window to a file in the current directory. Default filename is ‘kubeterminal_output_<timestamp>.txt’

Closing comments

I am a bit biased but KubeTerminal has improved my productivity ever since the first version.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sami Salkosuo

Sami Salkosuo

IBM Technical Specialist. The Open Group Master Certified Technical Specialist.