隐藏侧边栏

Kubernetes 命令别名缩写

 邱少羽梦
2022-12-09 / 0 评论 / 0 点赞 / 44 阅读 / 1,282 字 / 正在检测是否收录...
温馨提示:
本文最后更新于 2022-12-10,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系博主删除。
alias k='kubectl'

# 切换命名空间
alias kcd='kubectl config set-context $(kubectl config current-context) --namespace'

alias kg='kubectl get'
alias kgpo='kubectl get pods'
alias kgdep='kubectl get deployment'
alias kgcm='kubectl get configmap'
alias kgsvc='kubectl get service'
alias kgns='kubectl get namespaces'
alias kgno='kubectl get nodes'
alias kgposl='kubectl get pods --show-labels'
alias kgsvcoyaml='kubectl get service -o=yaml'
alias kgsvcwn='kubectl get service --watch --namespace'
alias kgsvcslwn='kubectl get service --show-labels --watch --namespace'

alias kd='kubectl describe'
alias kdno='kubectl describe nodes'
alias kdsvc='kubectl describe service'
alias kdns='kubectl describe namespaces'

alias krm='kubectl delete'
alias krmf='kubectl delete -f'
alias krmpo='kubectl delete pods'
alias krmsvc='kubectl delete service'
alias krmcm='kubectl delete configmap'
alias krmns='kubectl delete namespaces'
alias krmdep='kubectl delete deployment'

alias ka='kubectl apply --recursive -f'

alias kex='kubectl exec -i -t'
0

评论区