Giter Club home page Giter Club logo

kdash's Introduction

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

Sponsors

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

Bronze

Gold and Silver tiers are open for Sponsors

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 (Windows - Recommended way)

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

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

FLAGS:

  • -h, --help: Prints help information
  • -V, --version: Prints version information
  • -t, --tick-rate <tick-rate>: Set the tick rate (milliseconds): the lower the number the higher the FPS.
  • -p, --poll-rate <poll-rate>: Set the network call polling rate (milliseconds, should be multiples of tick-rate): the lower the number the higher the network calls.
  • -d, --debug[=<debug>]: Enables debug mode and writes logs to kdash-debug-<timestamp>.log file in the current directory. Default behavior is to write INFO logs. Pass a log level to overwrite the default [possible values: info, debug, trace, warn, error]

Limitations/Known issues

  • [Linux/Docker] Copy to clipboard feature is OS/arch dependent and might crash in some Linux distros and is not supported on aarch64 and arm machines.
  • [macOS] KDash looks better on iTerm2 since macOS's default Terminal app makes the colors render weird.
  • [Windows] KDash looks better on CMD since Powershell's default theme makes the colors look weird.
  • [Windows] If using k3d for local clusters, set the server URL to 127.0.0.1 as 0.0.0.0 doesn't work with kube-rs. You can use k3d cluster create --api-port 127.0.0.1:6550 or change the cluster.server value in your .kube/config for the k3d cluster to 127.0.0.1:<port>.

Features

  • CLI info
  • Node metrics
  • Resource watch (configurable polling interval with -p flag)
  • Custom resource definitions
  • Describe resources & copy the output
  • Get YAML for resources & copy the output
  • Stream container logs
  • Context
    • Context info
    • Context watch
    • Change namespace
    • Context switch
  • Resources utilizations for nodes, pods and namespaces based on metrics server. Requires metrics-server to be deployed on the cluster.
  • Dark/Light themes
  • Sensible keyboard shortcuts
  • Global glob filtering for resource names

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

Creator

kdash's People

Contributors

4f2e4a2e avatar clux avatar codeautopilot[bot] avatar deepu105 avatar dependabot[bot] avatar jerichokeyne avatar matthiasbeyer avatar omid avatar shinu-ynap avatar shinusuresh avatar somayaj avatar tobiasdebruijn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kdash's Issues

Page Up / Down Support

Is your feature request related to a problem? Please describe.
I would like to be able to scroll down the list of pods quickly, adding support for Page Up / Down via the same keys would aid with this.

Describe the solution you'd like
Allow for the Page Up and Page Down key to be used to perform page scrolls within any of the screens.

Describe alternatives you've considered
Scrolling down using the cursor keys is slow, an alternative would be to make the overal scroll performance faster

Crash while viewing utilization of K8s cluster

Describe the bug
A clear and concise description of what the bug is.
Application crashed while viewing utilization of K8s cluster

To Reproduce
Steps to reproduce the behavior or a screencast

  1. Open application
  2. Go to utilization tab
  3. Play a bit with the grouping <g>
  4. ???
  5. Crash

Expected behavior
A clear and concise description of what you expected to happen.
The application does not crash

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • OS and OS version: [e.g. macOS 10.1 / Fedora 34 / WIndows 10]
Ubuntu 20.04 LTS
Linux artemis 5.4.0-77-generic #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
  • Terminal name and version [e.g. Tilix, Yakuake, Gnome Terminal, Konsole, iTerm, Windows CMD]
Windows terminal using WSL2, though accessing a remote server over SSH
  • Shell name and version [e.g. bash, zsh, fish, powershell]
GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)
  • Kubectl Client Version [e.g. 1.19]
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.5", GitCommit:"6b1d87acf3c8253c123756b9e61dac642678305f", GitTreeState:"clean", BuildDate:"2021-03-18T01:10:43Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}
  • Kubectl Server Version [e.g. 1.19]
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.5", GitCommit:"6b1d87acf3c8253c123756b9e61dac642678305f", GitTreeState:"clean", BuildDate:"2021-03-18T01:02:01Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}
  • KDash version [e.g. 0.0.8] 0.1.2

Additional context
Add any other context about the problem here.
Produced logs file:

tobias@artemis:~/kubernetes/manifests/system$ cat /tmp/report-310a52bb-fffa-45d3-bbfa-c68aa9d110aa.toml
name = 'kdash'
operating_system = 'unix:Ubuntu'
crate_version = '0.1.2'
explanation = '''
Panic occurred in file '/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.15.0/src/widgets/table.rs' at line 359
'''
cause = 'index out of bounds: the len is 171 but the index is 171'
method = 'Panic'
backtrace = '''

   0: 0x7f29ada79c82 - <unresolved>
   1: 0x7f29add1dcae - <unresolved>
   2: 0x7f29adbeae03 - <unresolved>
   3: 0x7f29adccf1d2 - <unresolved>
   4: 0x7f29adbcc548 - <unresolved>
   5: 0x7f29adb6e092 - <unresolved>
   6: 0x7f29adbdf629 - <unresolved>
   7: 0x7f29adcc1a14 - <unresolved>
   8: 0x7f29adc509ea - <unresolved>
   9: 0x7f29adb2f8c3 - <unresolved>
  10: 0x7f29adc31f0d - <unresolved>
  11: 0x7f29ae16cfa9 - <unresolved>
  12: 0x7f29adc510e2 - <unresolved>

Cargo install fails when compiling k8s-openapi

Describe the bug
When running cargo install to install kdash, it'll fail to compile k8s-openapi:

  None of the v1_* features are enabled on the k8s-openapi crate.

  The k8s-openapi crate requires a feature to be enabled to indicate which version of Kubernetes it should support.

This is likely a configuration issue in kdash, and not a bug in k8s-openapi

To Reproduce

  1. Run cargo install kdash
  2. Observe

Expected behavior
cargo finishes successfully and kdash is installed

Screenshots
N,A.

Desktop (please complete the following information):

  • OS and OS version: [e.g. macOS 10.1 / Fedora 34 / WIndows 10] Ubuntu 20.04 under WSL2 under Windows 10
  • Terminal name and version [e.g. Tilix, Yakuake, Gnome Terminal, Konsole, iTerm, Windows CMD] Windows Terminal
  • Shell name and version [e.g. bash, zsh, fish, powershell] Bash GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)
  • Kubectl Client Version [e.g. 1.19] 1.21
  • Kubectl Server Version [e.g. 1.19] 1.21
  • KDash version [e.g. 0.0.8] Tested on:

Fails on:

  1. 0.2.3 (latest)
  2. 0.2.2
  3. 0.2.1
  4. 0.2.0
  5. 0.1.2

Works on:

  1. 0.1.1 # Had to install libxcb-xfixes0-dev and libxcb-xfixes0 first.
  2. 0.1.0

It appears the regression was thus introduced in 0.1.2

Additional context
Cargo version: cargo 1.55.0 (32da73ab1 2021-08-23)
rustc version: rustc 1.55.0 (c8dfcfe04 2021-09-06)
rustup version: rustup 1.24.3 (ce5817a94 2021-05-31)
stable toolchain

Full output:

tobias@DESKTOP-M130L88:~$ cargo install kdash --version 0.1.2
  Downloaded kdash v0.1.2
  Downloaded 1 crate (4.4 MB) in 2.25s
    Updating crates.io index
  Installing kdash v0.1.2
  Downloaded snafu v0.6.10
  Downloaded doc-comment v0.3.3
  Downloaded snafu-derive v0.6.10
  Downloaded dashmap v4.0.2
  Downloaded kube v0.56.0
  Downloaded kube-core v0.56.0
  Downloaded kube-runtime v0.56.0
  Downloaded k8s-openapi v0.11.0
  Downloaded 8 crates (5.4 MB) in 1.73s (largest was `k8s-openapi` at 5.3 MB)
   Compiling libc v0.2.102
   Compiling autocfg v1.0.1
   Compiling proc-macro2 v1.0.29
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.77
   Compiling cfg-if v1.0.0
   Compiling memchr v2.4.1
   Compiling log v0.4.14
   Compiling once_cell v1.8.0
   Compiling cc v1.0.70
   Compiling pin-project-lite v0.2.7
   Compiling serde_derive v1.0.130
   Compiling futures-core v0.3.17
   Compiling serde v1.0.130
   Compiling itoa v0.4.8
   Compiling bytes v1.1.0
   Compiling proc-macro-hack v0.5.19
   Compiling futures-task v0.3.17
   Compiling futures-channel v0.3.17
   Compiling lazy_static v1.4.0
   Compiling futures-sink v0.3.17
   Compiling proc-macro-nested v0.1.7
   Compiling ryu v1.0.5
   Compiling slab v0.4.4
   Compiling fnv v1.0.7
   Compiling pkg-config v0.3.20
   Compiling hashbrown v0.11.2
   Compiling bitflags v1.3.2
   Compiling pin-utils v0.1.0
   Compiling futures-io v0.3.17
   Compiling serde_json v1.0.68
   Compiling base64 v0.13.0
   Compiling adler v1.0.2
   Compiling matches v0.1.9
   Compiling foreign-types-shared v0.1.1
   Compiling openssl v0.10.36
   Compiling version_check v0.9.3
   Compiling crc32fast v1.2.1
   Compiling httparse v1.5.1
   Compiling percent-encoding v2.1.0
   Compiling tower-service v0.3.1
   Compiling try-lock v0.2.3
   Compiling parking_lot_core v0.8.5
   Compiling smallvec v1.6.1
   Compiling native-tls v0.2.8
   Compiling regex-syntax v0.6.25
   Compiling httpdate v1.0.1
   Compiling tinyvec_macros v0.1.0
   Compiling scopeguard v1.1.0
   Compiling openssl-probe v0.1.4
   Compiling unicode-width v0.1.9
   Compiling linked-hash-map v0.5.4
   Compiling tower-layer v0.3.1
   Compiling pin-project-internal v0.4.28
   Compiling k8s-openapi v0.11.0
   Compiling dtoa v0.4.8
   Compiling either v1.6.1
   Compiling unicode-bidi v0.3.6
   Compiling k8s-openapi v0.13.0
   Compiling static_assertions v1.1.0
   Compiling doc-comment v0.3.3
   Compiling unicode-segmentation v1.8.0
   Compiling untrusted v0.7.1
   Compiling spin v0.5.2
   Compiling strsim v0.8.0
   Compiling gimli v0.25.0
   Compiling vec_map v0.8.2
   Compiling ansi_term v0.11.0
   Compiling ppv-lite86 v0.2.10
   Compiling anyhow v1.0.44
   Compiling rustc-demangle v0.1.21
   Compiling termcolor v1.1.2
   Compiling smawk v0.3.1
   Compiling cassowary v0.3.0
   Compiling instant v0.1.11
   Compiling tokio v1.12.0
   Compiling num-traits v0.2.14
   Compiling futures-macro v0.3.17
   Compiling indexmap v1.7.0
   Compiling futures-util v0.3.17
   Compiling num-integer v0.1.44
   Compiling miniz_oxide v0.4.4
   Compiling openssl-src v111.16.0+1.1.1l
   Compiling tracing-core v0.1.20
   Compiling http v0.2.5
   Compiling ring v0.16.20
   Compiling backtrace v0.3.61
   Compiling foreign-types v0.3.2
   Compiling form_urlencoded v1.0.1
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling tinyvec v1.5.0
   Compiling lock_api v0.4.5
   Compiling textwrap v0.11.0
   Compiling yaml-rust v0.4.5
   Compiling itertools v0.10.1
   Compiling twox-hash v1.6.1
error: failed to run custom build command for `k8s-openapi v0.13.0`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installG6ZlmT/release/build/k8s-openapi-80fb7a754af4404d/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at '
  None of the v1_* features are enabled on the k8s-openapi crate.

  The k8s-openapi crate requires a feature to be enabled to indicate which version of Kubernetes it should support.

  If you're using k8s-openapi in a binary crate, enable the feature corresponding to the minimum version of API server that you want to support. It may be possible that your binary crate does not directly depend on k8s-openapi. In this case, add a dependency on k8s-openapi, then enable the corresponding feature.

  If you're using k8s-openapi in a library crate, add a dev-dependency on k8s-openapi and enable one of the features there. This way the feature will be enabled when buildings tests and examples of your library, but not when building the library itself. It may be possible that your library crate does not directly depend on k8s-openapi. In this case, add a dev-dependency on k8s-openapi, then enable the corresponding feature.

  Library crates *must not* enable any features in their direct dependency on k8s-openapi, only in their dev-dependency. The choice of Kubernetes version to support should be left to the final binary crate, so only the binary crate should enable a specific feature. If library crates also enable features, it can cause multiple features to be enabled simultaneously, which k8s-openapi does not support.

  If you want to restrict your library crate to support only a single specific version or range of versions of Kubernetes, please use the k8s_* version-specific macros to emit different code based on which feature gets enabled in the end.', /home/tobias/.cargo/registry/src/github.com-1ecc6299db9ec823/k8s-openapi-0.13.0/build.rs:9:42
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `kdash v0.1.2`, intermediate artifacts can be found at `/tmp/cargo-installG6ZlmT`

Caused by:
  build failed

Improve error handling

Currently errors are shown in a popup and often it breaks UI.

  • Show error popup only for panics/critical errors
  • Show non-intrusive warning for other cases

No CPU/Mem metrics

Hey there,

First of all, loving the project so far! Keep up the awesome work.

I'm getting everything from the cluster, pods, etc all works file. But metrics, i.e cpu and memory show 0, which I doubt is correct.
What is required in terms of (special) K8s configuration to get these two metrics working?

Thanks!

Edit I'm on K8s 1.20

Add vim-like key bindings for arrow movements

Many TUI programs will use hjkl as an alternate way to use the arrow keys, following the vim-style of keybindings. I noticed that kdash does not currently have any bindings for hjkl, so it'd be awesome to see these added as arrow-key alternatives.

Is your feature request related to a problem? Please describe.
My muscle memory is programmed for hjkl rather than left-down-up-right

Describe the solution you'd like
Adding new keybindings for h = left, j = down, k = up, and l = right

"Error from network dispatch channel closed"

Describe the bug
A clear and concise description of what the bug is.

I see Error from network dispatch channel closed when I launch kdash, this is printed repeatedly on the screen.
Is this because of configuration?
I'm running Kubernetes using Azure Kubernetes Service.

To Reproduce
Steps to reproduce the behavior or a screencast

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS and OS version: [e.g. macOS 10.1 / Fedora 34 / WIndows 10]
  • Terminal name and version [e.g. Tilix, Yakuake, Gnome Terminal, Konsole, iTerm, Windows CMD]
  • Shell name and version [e.g. bash, zsh, fish, powershell]
  • Kubectl Client Version [e.g. 1.19]
  • Kubectl Server Version [e.g. 1.19]
  • KDash version [e.g. 0.0.8]

Additional context
Add any other context about the problem here.

Add support for Jobs

Is your feature request related to a problem? Please describe.
Add a tab to support Jobs (Tab 8)

Crash on exit

Describe the bug
Application crashes when exiting via the ESC key.

To Reproduce
Steps to reproduce the behavior or a screencast

  1. Open application
  2. Hit the ESC key
  3. Crash

Expected behavior
Gracefully exit the application

Desktop (please complete the following information):

  • OS and OS version: RHEL 8.4
  • Terminal name and version: kitty
  • Shell name and version: bash 4.4.20
  • Kubectl Client Version: 1.20.5
  • Kubectl Server Version: 1.20.5
  • KDash version: 0.2.0

kdash Crash Report

Describe the bug

Report a crash report as it's asked when it happens.

To Reproduce
Steps to reproduce the behavior or a screencast

Perhaps I did something but I cannot reproduce the crash again doing what I remember that I did when it crashed.

I was in the utilization tab and I have several context configured.

Desktop (please complete the following information):

  • OS and OS version Ubuntu 20.04 docker container with several tools installed
  • Terminal name and version tmux 3.0a
  • Shell name and version zsh 5.8 (x86_64-ubuntu-linux-gnu)
  • Kubectl Client Version 1.17.14
  • Kubectl Server Version 1.18.17-gke.1901
  • KDash version 0.1.2

Additional context

Crash report content:

name = 'kdash'
operating_system = 'unix:Ubuntu'
crate_version = '0.1.2'
explanation = '''
Panic occurred in file '/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.15.0/src/widgets/table.rs' at line 359
'''
cause = 'index out of bounds: the len is 72 but the index is 127'
method = 'Panic'
backtrace = '''

   0: 0x7f1102848c82 - <unresolved>
   1: 0x7f1102aeccae - <unresolved>
   2: 0x7f11029b9e03 - <unresolved>
   3: 0x7f1102a9e1d2 - <unresolved>
   4: 0x7f110299b548 - <unresolved>
   5: 0x7f110293d092 - <unresolved>
   6: 0x7f11029ae629 - <unresolved>
   7: 0x7f1102a90a14 - <unresolved>
   8: 0x7f1102a1f9ea - <unresolved>
   9: 0x7f11028fe8c3 - <unresolved>
  10: 0x7f1102a00f0d - <unresolved>
  11: 0x7f1102f3bfa9 - <unresolved>
  12: 0x7f1102a200e2 - <unresolved>'''

Show merged logs from same containers in differents pod of 1 replicaset

Is your feature request related to a problem? Please describe.
When I send a request to a service backed by a replicaset that has more than one pod, I cannot know in advance which pod will execute the request. I end up switching between all the pod backing the replicaset to find the one with the right logs. Or, if that is possible, I scale down the replicaset.

Describe the solution you'd like
For a replicaset, see the containers defined in the pod template. When one of those containers is selected, the merged logs for all the pods that run that container are shown in a single view, ordered by timestamp, with the pod name as a prefix.

Describe alternatives you've considered

  • A quicker way to switch between logs of similar containers in a replicaset.
  • Not having to select a container in a pod when I want to see its log. In a lot of cases a pod runs just a single (main) container.

Additional context
None.

Missing docker latest image

Describe the bug
Running given docker command will fail to execute because no image is available for latest tag.

To Reproduce

$ docker run --rm -it -v ~/.kube/config:/root/.kube/config deepu105/kdash

docker: Error response from daemon: manifest for deepu105/kdash:latest not found: manifest unknown: manifest unknown.

Expected behavior
Being able to get the latest version without tag.

"cargo install kdash" fails during compilation

Describe the bug
Executing cargo install kdash to install the v0.2.3 crate fails during compilation

To Reproduce
Steps to reproduce the behavior:

  1. Execute cargo install kdash

Expected behavior
Installation of the crate

Screenshots
The following is output during the install:

error: failed to run custom build command for `k8s-openapi v0.13.0`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installJLFrYi/release/build/k8s-openapi-405af67896caa110/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at '
  None of the v1_* features are enabled on the k8s-openapi crate.

  The k8s-openapi crate requires a feature to be enabled to indicate which version of Kubernetes it should support.

  If you're using k8s-openapi in a binary crate, enable the feature corresponding to the minimum version of API server that you want to support. It may be possible that your binary crate does not directly depend on k8s-openapi. In this case, add a dependency on k8s-openapi, then enable the corresponding feature.

  If you're using k8s-openapi in a library crate, add a dev-dependency on k8s-openapi and enable one of the features there. This way the feature will be enabled when buildings tests and examples of your library, but not when building the library itself. It may be possible that your library crate does not directly depend on k8s-openapi. In this case, add a dev-dependency on k8s-openapi, then enable the corresponding feature.

  Library crates *must not* enable any features in their direct dependency on k8s-openapi, only in their dev-dependency. The choice of Kubernetes version to support should be left to the final binary crate, so only the binary crate should enable a specific feature. If library crates also enable features, it can cause multiple features to be enabled simultaneously, which k8s-openapi does not support.

  If you want to restrict your library crate to support only a single specific version or range of versions of Kubernetes, please use the k8s_* version-specific macros to emit different code based on which feature gets enabled in the end.', /home/matt/.cargo/registry/src/github.com-1ecc6299db9ec823/k8s-openapi-0.13.0/build.rs:9:42
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `kdash v0.2.3`, intermediate artifacts can be found at `/tmp/cargo-installJLFrYi`

Desktop (please complete the following information):

  • OS and OS version: Ubuntu 20.04
  • Terminal name and version: Kitty
  • Shell name and version: bash
  • KDash version: v0.2.3

Additional context
Cargo looks to be retrieving a new version of the k8s-openapi crate than what kdash states via the Cargo.toml file. Which looks to be due to other dependencies requiring the newer version of the crate.

Does not handle missing or blank kubeconfig files gracefully

Describe the bug
If a file or path in KUBECONFIG env var is missing or kubeconfig file is blank, kdash exits with a crash report. It would be better if the missing kubeconfigs are either ignored or a cleaner error message is presented.

To Reproduce

  1. Add a non-existing path, a path without a kubeconfig or a blank kubeconfig file in KUBECONFIG environment variable
  2. Start kdash

Expected behavior

  • Either: invalid config is ignored and kdash functions normally
  • Or: clean error output stating missing kubeconfig path, instead of crash report

Desktop (please complete the following information):

  • MacOS 11.5
  • iTerm2 3.4.8
  • Bash 5.1.8
  • Kubectl Client Version 1.21.0
  • Kubectl Server Version 1.19
  • KDash version 0.2.3
  • Installed from homebrew

kdash fails to start due to tcp connect error on Windows

Describe the bug
I use k3d to bootstrap a k8s cluster locally. When I now open kdash, the error
HyperError: error trying to connect: tcp connect error: Die angeforderte Adresse ist in diesem Kontext ungültig. (os error 10049)
appears after some seconds and I'm not able to see the resource overview. With other tools (kubectl, k9s) I can connect to the cluster without any problems.

Also, sometimes when I press Ctrl-C to close kdash after the previous mentioned error appeared, I get the following error in the cmd:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
OSError: [Errno 22] Invalid argument
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='cp1252'>
OSError: [Errno 22] Invalid argument

To Reproduce

  1. Create a local k8s cluster using k3d cluster create
  2. Start kdash using the kdash command
  3. Wait a few seconds
  4. See error

Expected behavior
The resource overview loads.

Screenshots
image

10-59-11.mp4

Desktop (please complete the following information):

  • OS and OS version: Windows 10
  • Terminal name and version: Windows CMD
  • Shell name and version: -
  • Kubectl Client Version: v1.21.0
  • Kubectl Server Version: v1.20.5+k3s1
  • KDash version: 0.0.8

Additional context

kubectl version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.0", GitCommit:"cb303e613a121a29364f75cc67d3d580833a7479", GitTreeState:"clean", BuildDate:"2021-04-08T16:31:21Z", GoVersion:"go1.16.1", Compiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.5+k3s1", GitCommit:"355fff3017b06cde44dbd879408a3a6826fa7125", GitTreeState:"clean", BuildDate:"2021-03-31T06:21:52Z", GoVersion:"go1.15.10", Compiler:"gc", Platform:"linux/amd64"}
k3d version
k3d version v4.4.1
k3s version v1.20.5-k3s1 (default)

Add support for DeamonSets

Is your feature request related to a problem? Please describe.
Add a tab to support DeamonSets (Tab 9)

Context with no permission to enumerate other namespaces will not enumerate pods

Describe the bug
If the user of the active context does not have permission to enumerate other namespaces, etc., errors will be shown and no pods are listed in the current namespace even though it's permitted for the user

To Reproduce
Steps to reproduce the behavior or a screencast

  • select a context with permission restrictions

Expected behavior

  • resources that the user have permission to view will be shown
  • resources that the user does not have permission to view will not be shown (perhaps a 'no permission' message be presented)

Desktop (please complete the following information):
MacOS 11.5
iTerm2 3.4.8
Bash 5.1.8
Kubectl Client Version 1.21.0
Kubectl Server Version 1.19
KDash version 0.2.3
Installed from homebrew

Nodes are not captured for EKS clusters

Describe the bug
Node are missing for EKS

Desktop (please complete the following information):

  • OS and OS version: Fedora 32
  • Terminal name and version: Yakuake
  • Shell name and version: zsh
  • Kubectl Client Version: v1.17.17
  • Kubectl Server Version [v1.20.7-eks]
  • KDash version [0.2.3]

Additional context
Metrics are also not captured. Look for unhandled errors

kdash Crash Report

name = 'kdash'
operating_system = 'unix:Manjaro'
crate_version = '0.2.6'
explanation = '''
Panic occurred in file '~/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.16.0/src/widgets/gauge.rs' at line 204
'''
cause = 'Ratio should be between 0 and 1 inclusively.'
method = 'Panic'
backtrace = '''

   0: 0x557115c570f2 - kdash::main::hbb7d0b00cd09bc2d
   1: 0x557115b1a0b3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h37718759770cb226
   2: 0x557115c62eb7 - main
   3: 0x7f02e4dc4b25 - __libc_start_main
   4: 0x557115a9325e - _start
   5:        0x0 - <unresolved>'''

Improve log streaming for containers

Container logs are streamed now, but its not perfect, there are some issues that needs to be fixed

  • Due to timeout and re-poll, there might be some random missing log lines. May be this can be fixed by recording last update time and sending the elapsed duration as since_seconds in LogParams
  • The first 10 lines tailed may be can be buffered to show up immediately
  • Randomly the wrong log appears, even though there is explicit check for id and container id is sent in LogParams. Need to investigate
  • Repetitive logging on some workloads like wasm binaries and so on

Mention libxcb-xfixes0-dev and libxcb-shape0-dev in README

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Yes. cargo install kdash will fail on a fresh install of Ubuntu Desktop, with xorg-dev installed as per the README, because of missing dependencies

Describe the solution you'd like
A clear and concise description of what you want to happen.
The solution to the issue is to install libxcb-xfixes0-dev and libxcb-shape0-dev, the non--dev packages are not enough. The proposed solution is to add the following to the README for Ubuntu/Debian:

sudo apt install -y libxcb-xfixes0-dev and libxcb-shape0-dev

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
N.A.

Additional context
Add any other context or screenshots about the feature request here.

Output from rustc:

   Compiling kdash v0.2.4
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "/tmp/cargo-installGcVkvt/release/deps/kdash-3cd074a07c9a7e61.kdash.d81f41e3-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/tmp/cargo-installGcVkvt/release/deps" "-L" "/tmp/cargo-installGcVkvt/release/build/openssl-sys-8b6d1c8eda31ec5e/out/openssl-build/install/lib" "-L" "/tmp/cargo-installGcVkvt/release/build/ring-7cd5715780f3a214/out" "-L" "/home/tobias/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/rustciKrNKZ/libopenssl_sys-91ac39aed5aff684.rlib" "/tmp/rustciKrNKZ/libring-e3238ae251d7e213.rlib" "-Wl,--start-group" "-Wl,--end-group" "/home/tobias/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-dd7db1bec6909f24.rlib" "-Wl,-Bdynamic" "-lxcb" "-lxcb-render" "-lxcb-shape" "-lxcb-xfixes" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/tobias/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/tmp/cargo-installGcVkvt/release/deps/kdash-3cd074a07c9a7e61" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs"
  = note: /usr/bin/ld: cannot find -lxcb-shape
          /usr/bin/ld: cannot find -lxcb-xfixes
          collect2: error: ld returned 1 exit status

TODO - More resources to add

Workloads

  • Pods
  • Deployments
  • Replica sets
  • Stateful sets
  • Jobs #35
  • Cron Jobs #45
  • Daemon sets #34
  • Replication Controllers #46

Service

  • Services
  • Ingresses #47

Config/Storage

  • Config Maps
  • Secrets #48
  • Persistent Volume Claims #49
  • Storage classes #50

Cluster

  • Nodes
  • Namespaces
  • Cluster roles #51
  • Cluster role bindings #52
  • Network policies #53
  • Persistent volumes #54
  • Role bindings #55
  • Roles #56
  • Service accounts #57

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.