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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

powerk8s-0.8.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

powerk8s-0.8.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file powerk8s-0.8.0.tar.gz.

File metadata

  • Download URL: powerk8s-0.8.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/5.15.0-1035-azure

File hashes

Hashes for powerk8s-0.8.0.tar.gz
Algorithm Hash digest
SHA256 8811e063c60828944e19f9da0cb7d2e6ef50c583206d2f4287077af9f36093de
MD5 126b4ef0f0c810476902034e918efaf1
BLAKE2b-256 b6069d0046a263bfdfafcf9966a1db746b238563131f871524f4812a03b4d175

See more details on using hashes here.

File details

Details for the file powerk8s-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: powerk8s-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/5.15.0-1035-azure

File hashes

Hashes for powerk8s-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c104dfcaf1ad766f847915153de597b6c639d26d231dd047a5d4d30bd1015431
MD5 dc458c8b7dc80eb8fe755b060eda1361
BLAKE2b-256 4a1b041c99c4ca3dfb409dbf2403a099a26a0fb7e57b7612848a81248225e4c7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page