项目作者: ejether

项目描述 :
Interactive shell wrapper to kubectl
高级语言: Python
项目地址: git://github.com/ejether/k8sh.git
创建时间: 2017-05-26T16:00:52Z
项目社区:https://github.com/ejether/k8sh

开源协议:GNU General Public License v3.0

下载


k8sh

Interactive shell wrapper to kubectl.
k8sh allows you to save key strokes and see your context and namespace in the command line. Avoid mistakes and save time

Usage

  1. # k8sh
  2. kubectl --context=staging >set_context prod
  3. prod
  4. kubectl --context=prod >set_namespace test
  5. test
  6. kubectl --context=prod --namespace=test > get pods

k8sh offers:

  • constant reminder of your conext and namespace (if set)
  • tab completion of all normal kubectl methods
    • currently only get and describe will auto complete existing kubernetes objects
  • normal command line options and arguments are passed transparently

Installation

pip install -U git+git://github.com/ejether/k8sh.git

Requirements

k8sh requires:

  • kubectl binary must be installed and available on the $PATH
  • python 2.7
  • a valid kubeconfg at ~/.kube/config or path set in the environment variable $KUBECONFIG

Known issues

  1. Limited support for the flexible plurality that kubectl offers i.e pod vs pods. k8sh will still pass the plural version through to kubectl but it will not tab complete for existing kubernetes objects