Coder Social home page Coder Social logo

kcontext's Introduction

kcontext - Kubernetes Context Selector

kcontext is a versatile tool designed to simplify the process of selecting Kubernetes contexts, allowing you to effortlessly switch between different clusters and namespaces. It enhances context selection by utilizing tags based on context names, making it quick and intuitive to identify and choose the context you need.

Features

  • Tag-Based Context Selection: kcontext introduces a novel way to select contexts by associating tags with context names. When you list your contexts, you will see tags displayed before each context name, making it easier to identify their purpose.

  • Color-Coded Tags: To enhance visibility and distinction, kcontext color-codes the tags. Tags are displayed in the order they are defined, providing a clear visual hierarchy for your contexts.

Customizable Tagging

You have the flexibility to customize the tagging to suit your preferences. By setting the K_CONTEXT_TAGS environment variable with your preferred key-value pairs in a comma-separated format, you can tailor the tagging system to your specific needs.

Example

export K_CONTEXT_TAGS="production=[prod],development=[dev],west=[west],central=[cent]"

If you don't set the K_CONTEXT_TAGS environment variable, kcontext will use a default tag map that includes common tags like [prod] for production, [dev] for development, and others to represent different context types.

Usage

  1. Installation:
pip install git+https://github.com/renjithpk/kcontext.git
  1. Select Context: Once installed and configured, simply run kcontext to see your list of Kubernetes contexts with tags. Use the displayed tags to quickly identify and choose the context you want.

kcontext's People

Contributors

renjithpk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.