Skip to main content

Powerline Segment for Kubernetes

Project description

☸️ 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

Project details


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.1.10.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: powerk8s-0.1.10.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Darwin/20.2.0

File hashes

Hashes for powerk8s-0.1.10.tar.gz
Algorithm Hash digest
SHA256 3f788438957fa5a235cb8540748b4db3ee5cf9c13ec4b639714ac6320f47de14
MD5 41b46e57a7caeb135c87e1938d3af5d4
BLAKE2b-256 bf8fbb12912182f28b842fcc3e71850747ebc63b8c3f530f510ebb1e73918aa9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: powerk8s-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Darwin/20.2.0

File hashes

Hashes for powerk8s-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 033d96c7b07fe3557b851536b2a79e8343f1f664351d62c0e45207128272c1de
MD5 cbc598577c43e3bd71154f2fc35f0dfe
BLAKE2b-256 cfa0ea9e9a00644aced9f66ef53a26f54998457d3967eecb713dfc36064ee631

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page