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.8.0.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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