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
# k8sh
kubectl --context=staging >set_context prod
prod
kubectl --context=prod >set_namespace test
test
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
getanddescribewill auto complete existing kubernetes objects
- currently only
- normal command line options and arguments are passed transparently
pip install -U git+git://github.com/ejether/k8sh.git
k8sh requires:
kubectlbinary must be installed and available on the $PATH- python 2.7
- a valid kubeconfg at
~/.kube/configor path set in the environment variable$KUBECONFIG
- Limited support for the flexible plurality that
kubectloffers i.e pod vs pods.k8shwill still pass the plural version through tokubectlbut it will not tab complete for existing kubernetes objects