kube
Segment
Description
This segment show kubernetes information of the form
current-cluster:current-namespace
as set in your kube config.
This segment is shown only when global variable KUBE_ENV
exists and is not
empty and kubernetes context can be retrive with kubectl
command.
As I manage multiple kubernetes cluster depending on project, I set variables
KUBE_ENV
and KUBECONFIG
by project using direnv.
To see how to use direnv
for your folder, see section
Using direnv to setup environment-variables
Requirements
This segment require the command kubectl
to be in your PATH
.
To install kubectl
, see Install and Set Up kubectl.
Variables
Variables | Default | Description |
---|---|---|
KUBE_CHAR |
⎈ |
Character to show before the segment content |
KUBE_FG |
white | Foreground color of segment |
KUBE_BG |
black | Background color of segment, only used by v2 |
Examples
Prompt v1 | Prompt v2 | |
---|---|---|
Full Version | ||
Maximum Short Version |
Last update:
December 2, 2021