项目作者: Corei13

项目描述 :
k8s shortcuts
高级语言: Shell
项目地址: git://github.com/Corei13/shortk8s.git
创建时间: 2019-07-17T01:45:05Z
项目社区:https://github.com/Corei13/shortk8s

开源协议:

下载


shortk8s

  1. # kubectl
  2. $ k
  1. # kubectl get
  2. $ kg pod/🔥
  1. # kubectl describe
  2. $ kd pod/🎉
  1. # kubectl logs
  2. $ kl pod/🔥
  3. fire!
  4. fire!
  5. fire!
  1. # kubectl apply -f
  2. $ kf 🚒.yaml
  3. deployment.apps/🧯configured
  4. service/🚒 configured
  5. pod/🔥 unchanged
  1. # kubectl exec -it
  2. $ kx pod/🔥 ls
  3. 💣 💥 🧨 🌶 🍜
  1. # list all namespaces
  2. $ kn
  3. default
  4. defaulter
  5. defaultest
  6. heteronormal
  7. comfortably-numb
  8. # select a namespace for subsequent commands
  9. $ kn comfortably-numb
  1. # list all contexts and show current one
  2. $ ktx
  3. one-context
  4. another-one
  5. * the-selected-one
  6. wish-i-was-selected
  7. dont-select-me
  8. # switch to a context
  9. $ ktx dont-select-me

Installation

zsh

  1. curl -s https://raw.githubusercontent.com/Corei13/shortk8s/master/shortk8s.sh >> ~/.zshrc
  2. source ~/.zshrc

bash

  1. curl -s https://raw.githubusercontent.com/Corei13/shortk8s/master/shortk8s.sh >> ~/.bashrc
  2. source ~/.bashrc