All Projects → sbstp → Kubie

sbstp / Kubie

Licence: zlib
A more powerful alternative to kubectx and kubens

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Kubie

Awesome Kubectl Plugins
Curated list of kubectl plugins
Stars: ✭ 279 (-56.88%)
Mutual labels:  kubectl
Kubecolor
colorizes kubectl output
Stars: ✭ 363 (-43.89%)
Mutual labels:  kubectl
Krew Index
Plugin index for https://github.com/kubernetes-sigs/krew. This repo is for plugin maintainers.
Stars: ✭ 476 (-26.43%)
Mutual labels:  kubectl
Kubectl Fzf
A fast kubectl autocompletion with fzf
Stars: ✭ 315 (-51.31%)
Mutual labels:  kubectl
Rak8s
Stand up a Raspberry Pi based Kubernetes cluster with Ansible
Stars: ✭ 354 (-45.29%)
Mutual labels:  kubectl
Webkubectl
Run kubectl command in Web Browser.
Stars: ✭ 390 (-39.72%)
Mutual labels:  kubectl
Allok8
⚡️A pretty swell Kubernetes visualization tool
Stars: ✭ 281 (-56.57%)
Mutual labels:  kubectl
Geodesic
🚀 Geodesic is a DevOps Linux Distro. We use it as a cloud automation shell. It's the fastest way to get up and running with a rock solid Open Source toolchain. ★ this repo! https://slack.cloudposse.com/
Stars: ✭ 629 (-2.78%)
Mutual labels:  kubectl
Krew
📦 Find and install kubectl plugins
Stars: ✭ 4,354 (+572.95%)
Mutual labels:  kubectl
Gbt
Highly configurable prompt builder for Bash, ZSH and PowerShell written in Go.
Stars: ✭ 457 (-29.37%)
Mutual labels:  kubectl
Kubedog
Library to watch and follow kubernetes resources in CI/CD deploy pipelines
Stars: ✭ 326 (-49.61%)
Mutual labels:  kubectl
Kubectl Plugins
A Collection of Plugins for kubectl Integration (exec as any user, context switching, etc).
Stars: ✭ 340 (-47.45%)
Mutual labels:  kubectl
Kubectl Who Can
Show who has RBAC permissions to perform actions on different resources in Kubernetes
Stars: ✭ 432 (-33.23%)
Mutual labels:  kubectl
Kubetap
Kubectl plugin to interactively proxy Kubernetes Services with ease
Stars: ✭ 297 (-54.1%)
Mutual labels:  kubectl
Kubelive
kubectl tool reinvented to be more reactive and interactive 🔥
Stars: ✭ 497 (-23.18%)
Mutual labels:  kubectl
Kubectl Node Shell
Exec into node via kubectl
Stars: ✭ 277 (-57.19%)
Mutual labels:  kubectl
Fubectl
Reduces repetitive interactions with kubectl
Stars: ✭ 370 (-42.81%)
Mutual labels:  kubectl
Gcr.io mirror
all of the gcr.io docker image mirror
Stars: ✭ 650 (+0.46%)
Mutual labels:  kubectl
Kubelogin
kubectl plugin for Kubernetes OpenID Connect authentication (kubectl oidc-login)
Stars: ✭ 495 (-23.49%)
Mutual labels:  kubectl
Fish Kubectl Completions
kubectl completions for fish shell
Stars: ✭ 453 (-29.98%)
Mutual labels:  kubectl

Kubie

kubie is an alternative to kubectx, kubens and the k on prompt modification script. It offers context switching, namespace switching and prompt modification in a way that makes each shell independent from others. It also has support for split configuration files, meaning it can load Kubernetes contexts from multiple files. You can configure the paths where kubie will look for contexts, see the settings section.

Kubie also has other nice features such as kubie exec which allows you to execute commands in a context and a namespace without having to spawn a shell and kubie lint which scans your k8s config files for issues and informs you of what they are.

Thanks to @ahermant for the lovely logo!

Installation

Binary

You can download a binary for Linux or OS X on the GitHub releases page. You can use curl or wget to download it. Don't forget to chmod +x the file!

Cargo

You can build kubie from source using cargo and crates.io. If you do not have a Rust compiler installed, go to rustup.rs to get one. Then you can run cargo install kubie and kubie will be downloaded from crates.io and then built.

Homebrew

You can install kubie from Homebrew by running brew install kubie.

Nix

There is a kubie Nix package maintained by @illiusdope that you can install.

Bash autocomplete

If you want autocompletion for kubie ctx, kubie ns and kubie exec, please install this script:

sudo cp ./completion/kubie.bash /etc/bash_completion.d/kubie

Then spawn new shell or source copied file:

. /etc/bash_completion.d/kubie

Usage

Note that if you have fzf installed, the experience will be greatly improved. Selectable menus will be available when using kubie ctx and kubie ns.


  • kubie ctx show the list of available contexts (if fzf is installed, display a selectable menu of contexts)
  • kubie ctx <context> switch the current shell to the given context (spawns a shell if not a kubie shell)
  • kubie ctx - switch back to the previous context
  • kubie ctx <context> -r spawn a recursive shell in the given context
  • kubie ctx <context> -n <namespace> spawn a shell in the given context and namespace
  • kubie ns show the list of available namespaces (if fzf is installed, display a selectable menu of namespaces)
  • kubie ns <namespace> switch the current shell to the given namespace
  • kubie ns - switch back to the previous namespace
  • kubie ns <namespace> -r spawn a recursive shell in the given namespace
  • kubie exec <context> <namespace> <cmd> <args>... execute a command in the given context and namespace
  • kubie exec <wildcard> <namespace> <cmd> <args>... execute a command in all the contexts matched by the wildcard and in the given namespace
  • kubie exec <wildcard> <namespace> -e <cmd> <args>... execute a command in all the contexts matched by the wildcard and in the given namespace but fail early if any of the commands executed return a non-zero exit code
  • kubie edit if fzf is installed, display a selectable menu of contexts to edit
  • kubie edit <context> edit the file that contains this context
  • kubie edit-config edit kubie's own config file
  • kubie lint lint k8s config files for issues
  • kubie info ctx print name of current context
  • kubie info ns print name of current namespace
  • kubie info depth print depth of recursive contexts
  • kubie update will check the latest kubie version and update your local installation if needed

Settings

You can customize kubie's behavior with the ~/.kube/kubie.yaml file. The settings available and their defaults are available below.

# Force kubie to use a particular shell, if unset detect shell currently in use.
# Possible values: bash, dash, fish, zsh
# Default: unset
shell: bash

# Configure where to look for kubernetes config files.
configs:

    # Include these globs.
    # Default: values listed below.
    include:
        - ~/.kube/config
        - ~/.kube/*.yml
        - ~/.kube/*.yaml
        - ~/.kube/configs/*.yml
        - ~/.kube/configs/*.yaml
        - ~/.kube/kubie/*.yml
        - ~/.kube/kubie/*.yaml

    # Exclude these globs.
    # Default: values listed below.
    # Note: kubie's own config file is always excluded.
    exclude:
        - ~/.kube/kubie.yaml

# Prompt settings.
prompt:
    # Disable kubie's custom prompt inside of a kubie shell. This is useful
    # when you already have a prompt displaying kubernetes information.
    # Default: false
    disable: true

    # When using recursive contexts, show depth when larger than 1.
    # Default: true
    show_depth: true

    # When using zsh, show context and namespace on the right-hand side using RPS1.
    # Default: false
    zsh_use_rps1: false

    # When using fish, show context and namespace on the right-hand side.
    # Default: false
    fish_use_rprompt: false

# Behavior
behavior:
    # Make sure the namespace exists with `kubectl get namespaces` when switching
    # namespaces. If you do not have the right to list namespaces, disable this.
    # Default: true
    validate_namespaces: true

Future plans

  • Integration with vault to automatically download k8s configs from a vault server
  • Import/edit configs
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].