Skip to main content

☸️ powerk8s: Powerline Plugin for Kubernetes ☸️

Actions Test Workflow Widget PyPI Version Pdoc Documentation

This simple plugin is designed to show the Kubernetes cluster configured for the current context in $KUBECONFIG.

This work is inspired by so0k/powerline-kubernetes, and intends to be a drop-in replacement as well as an improvement upon the original work.

Installation

$ pip3 install powerk8s

Configuration

Just like with so0k/powerline-kubernetes, you'll need a few things to get going:

  • Colorschemes

    ~/.config/powerline/colorschemes/default.json:

    {
      "groups": {
        "kubernetes_cluster":         { "fg": "gray10", "bg": "darkestblue", "attrs": [] },
        "kubernetes_cluster:alert":   { "fg": "gray10", "bg": "darkestred",  "attrs": [] },
        "kubernetes_namespace":       { "fg": "gray10", "bg": "darkestblue", "attrs": [] },
        "kubernetes_namespace:alert": { "fg": "gray10", "bg": "darkred",     "attrs": [] },
        "kubernetes:divider":         { "fg": "gray4",  "bg": "darkestblue", "attrs": [] },
      }
    }
    
  • powerk8s invocation (& arguments)

    Here is a good starting point. ~/.config/powerline/themes/shell/default.json:

    {
      "function": "powerline_kubernetes.kubernetes",
      "priority": 30,
      "args": {
          "show_kube_logo": true,
          "show_cluster": true,
          "show_namespace": true,
          "show_default_namespace": false,
          "alerts": [
            "live",
            "cluster:live"
          ]
      }
    }
    

    This will add the segment to the shell. Alternatively, placing this in ~/.config/powerline/colorschemes/default.json will make it show up in the Tmux status line.

Authors

@gkze

License

MIT

Metadata

Release files for powerk8s 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for powerk8s 0.8.0
File Size Uploaded
powerk8s-0.8.0.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for powerk8s 0.8.0
File Interpreter ABI Platform
powerk8s-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.5 kB

Release files / powerk8s-0.8.0.tar.gz

Download URL powerk8s-0.8.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8811e063c60828944e19f9da0cb7d2e6ef50c583206d2f4287077af9f36093de
BLAKE2b-256 checksum
How to use checksums
b6069d0046a263bfdfafcf9966a1db746b238563131f871524f4812a03b4d175
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.11.3 Linux/5.15.0-1035-azure

Release files / powerk8s-0.8.0-py3-none-any.whl

Download URL powerk8s-0.8.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c104dfcaf1ad766f847915153de597b6c639d26d231dd047a5d4d30bd1015431
BLAKE2b-256 checksum
How to use checksums
4a1b041c99c4ca3dfb409dbf2403a099a26a0fb7e57b7612848a81248225e4c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.11.3 Linux/5.15.0-1035-azure

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.12

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page