jgentil / powerline-kubernetes

A Powerline segment to show your current Kubernetes context

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Powerline Kubernetes PyPI version

A Powerline segment to show the current Kubernetes context.

This segment shows the Kubernetes context together with a nice looking helm. Please feel free to propose more features and give me ideas on how to improve it.

## Requirements

The Kubernetes segment requires kubectl and kubernetes-py.

## Installation

Installing the Kubernetes segment can be done with pip:

$ pip install powerline-kubernetes

The Kubernetes segment uses a couple of custom highlight groups. You'll need to define those groups in your colorscheme, for example in .config/powerline/colorschemes/default.json:

{
  "groups": {
    "kubernetes":                { "fg": "gray8",           "bg": "darkestblue", "attrs": [] },
    "kubernetes:divider":        { "fg": "gray4",           "bg": "darkestblue", "attrs": [] }
  }
}

Then you can activate the Kubernetes segment by adding it to your segment configuration, for example in .config/powerline/themes/shell/default.json:

{
    "function": "powerline_kubernetes.kubernetes",
    "priority": 30
}

By default the segment will look for the Kubernetes config under ~/.kube/config. ## License

Licensed under the MIT License.


Inspired by powerline-docker.

About

A Powerline segment to show your current Kubernetes context

License:MIT License


Languages

Language:Python 100.0%