The Principal Dev – Masterclass for Tech Leads

The Principal Dev – Masterclass for Tech Leads28-29 May

Join

KDash - A fast and simple dashboard for Kubernetes

ci cd License LOC crates.io link Docker Release Release Coverage GitHub Downloads Docker pulls Crate.io downloads

Follow Deepu K Sasidharan (deepu105)

logo

A simple terminal dashboard for Kubernetes built with Rust Follow @kdashrs

UI

New since v0.6.2

Sponsors

Thanks to the sponsors of @deepu105 who makes maintaining projects like KDash sustainable. Consider sponsoring if you like the work.

Installation

Homebrew (Mac & Linux)

brew tap kdash-rs/kdash
brew install kdash

# If you need to be more specific, use:
brew install kdash-rs/kdash/kdash

To upgrade

brew upgrade kdash
scoop bucket add kdash-bucket https://github.com/kdash-rs/scoop-kdash

scoop install kdash

Chocolatey (Windows)

Chocolatey package is located here. Since validation of the package takes forever, it may take a long while to become available after a release. I would recommend using Scoop instead for Windows.

choco install kdash

# Version number may be required for newer releases, if available:
choco install kdash --version=0.4.3

To upgrade

choco upgrade kdash --version=0.4.3

Cargo

If you have Cargo installed then you install KDash from crates.io

cargo install kdash

# if you face issues with k8s-openapi crate try the below
cargo install --locked kdash

You can also clone the repo and run cargo run or make to build and run the app

Nix (Maintained by third party)

Try out kdash via nix run nixpkgs#kdash or add kdash to your configuration.nix for permanent installation.

Install script

Run the below command to install the latest binary. Run with sudo if you don't have write access to /usr/local/bin. Else the script will install to the current directory. Alternatively, set BIN_DIR environment variable e.g. BIN_DIR=~/.local/bin to override the default install location.

curl https://raw.githubusercontent.com/kdash-rs/kdash/main/deployment/getLatest.sh | bash

Manual

Binaries for macOS (x86_64, arm64), Linux GNU/MUSL(x86_64, armv6, armv7, aarch64) and Windows (x86_64, aarch64) are available on the releases page

  1. Download the latest binary for your OS.
  2. For Linux/macOS:
    1. cd to the file you just downloaded and run tar -C /usr/local/bin -xzf downloaded-file-name. Use sudo if required.
    2. Run with kdash
  3. For Windows:
    1. Use 7-Zip or TarTool to unpack the tar file.
    2. Run the executable file kdash.exe

Docker

Run KDash as a Docker container by mounting your KUBECONFIG. For example the below command for the default path

docker run --rm -it -v ~/.kube/config:/root/.kube/config deepu105/kdash
# If you want localhost access from the container
docker run --network host --rm -it -v ~/.kube/config:/root/.kube/config deepu105/kdash

You can also clone this repo and run make docker to build a docker image locally and run it using the above command

Troubleshooting

Note: This may not work properly if you run Kubernetes locally using Minikube or Kind

Note: On Debian/Ubuntu you might need to install libxcb-xfixes0-dev and libxcb-shape0-dev. On Fedora libxcb and libxcb-devel would be needed.

Note: On Linux you might need to have package xorg-dev (Debian/Ubuntu) or xorg-x11-server-devel (Fedora) or equivalent installed for the copy to clipboard features to work

Note: If you are getting compilation error from openSSL. Make sure perl and perl-core are installed for your OS.

USAGE:

kdash

Press ? while running the app to see keybindings

Configuration

KDash supports config-based keybinding and theme overrides, plus a configurable default for historical log lines fetched before live streaming starts.

By default it reads config from:

You can also point it at a specific file with:

KDASH_CONFIG=/path/to/config.yaml kdash

Theme overrides support separate light and dark values:

theme:
  dark:
    primary: "#89B4FA"
    background: "#11111B"
  light:
    primary: "#D20F39"
    background: "#FAF7F0"

Keybindings are overridden by binding name:

keybindings:
  filter: f
  help: h
  describe_resource: i
  resource_yaml: v

Log streaming history can also be tuned:

log_tail_lines: 250

The top status bar can also be customized:

# Hide the KDash logo block in the top bar. Defaults to false.
hide_logo: true
# Start with the entire info bar collapsed (namespaces, context, CLI info, logo).
# Toggle it back on at any time with the `toggle_info` keybinding (default `i`). Defaults to false.
hide_info_on_start: true

CLI Info entries can be configured too. Built-in entries remain enabled by default, missing binaries are hidden by default, you can disable any built-in by label, and you can add custom probes with a label plus command:

cli_info:
  hide_missing_binaries: false
  disable_defaults:
    - docker
  custom:
    - label: istioctl
      command: ["istioctl", "version"]
      regex: '\b(v?[0-9]+\.[0-9]+\.[0-9]+)\b'

Set hide_missing_binaries: false if you want missing CLIs to stay visible as Not found.

Built-in labels are: kubectl client, kubectl server, docker, docker-compose, podman, containerd, helm, and kind. For custom commands, regex is optional: if provided, the first capture group is shown; otherwise the first non-empty stdout line is shown.

See the sample config in assets/kdash.sample-config.yaml for a complete example with both custom keybindings and custom light/dark theme overrides.

FLAGS:

Limitations/Known issues

Features

Screenshots

Overview screen

UI

Container logs screen (light theme)

UI

Pod describe screen (light theme)

UI

Contexts screen

UI

Utilization screen

UI

Libraries used

How does this compare to K9S?

K9S is a beast compared to this as it offers way more features including CRUD actions.

KDash only offers a view of the resources with a focus on speed and UX. Really, if something is slow or has bad UX then please raise a bug. Hence the UI/UX is designed to be more user-friendly and easier to navigate with contextual help everywhere and a tab system to switch between different resources easily.

At least for now, there are no plans to add full CRUD for resources but in the future, we might.

Licence

MIT

Terms of use

Creator

Contributors

Join libs.tech

...and unlock some superpowers

GitHub

We won't share your data with anyone else.