the-k

    1.2.0 • Public • Published

    k

    Just like James Bond's Q, but for kubectl

    Q

    k is a kubectl helper to deal with different kubernetes envionments

    Installation

    npm install -g the-k

    Usage

    k [environment name] ... commands/shorthands
    # Without k 
    kubectl --kubeconfig /Users/max/.bluemix/plugins/container-service/clusters/moo-dev/moo-dev.yml exec -it mypod-abcdef -- /bin/sh
     
    # With k 
    k dev exec -it mypod-abcdef -- /bin/sh
     
    # With k on steroids 
    k dev e mypod-abcdef -- /bin/sh

    Configuration

    The kFile

    That what's all about. You need to place a .kfile.json inside your home directory. See below for an example config.

    Example .kfile.json

    {
      "shorthands": {
        "gp": ["get", "pods"],
        "gs": ["get", "services"],
        "e": ["exec", "-it"]
      },
      "environments": {
        "dev": {
          "kubeconfig": "/Users/max/.bluemix/plugins/container-service/clusters/moo-dev/moo-dev.yml"
        },
        "int": {
          "kubeconfig": "/Users/max/.bluemix/plugins/container-service/clusters/moo-int/moo-int.yml"
        },
        "prod": {
          "kubeconfig": "/Users/max/.bluemix/plugins/container-service/clusters/moo-int/moo-int.yml",
          "requiresConfirmation": true
        }
      }
    }

    Keywords

    none

    Install

    npm i the-k

    DownloadsWeekly Downloads

    1

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    4.97 kB

    Total Files

    6

    Last publish

    Collaborators

    • maximilian-krauss