我们专注攀枝花网站设计 攀枝花网站制作 攀枝花网站建设
成都网站建设公司服务热线:400-028-6601

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

Kuberneteskubectl命令自动补全

linux 命令补全

# centos 
yum install -y bash-completion
# Ubuntu
 apt install bash-completion
 # 生效命令补全
 source /usr/share/bash-completion/bash_completion
 # mac
 $ brew install bash-completion
  # 生效命令补全
 $ source $(brew --prefix)/etc/bash_completion
 # 可以测试docker 等其它很多命令
 docker  tab 建
[root@node02 ~]# docker
attach     config     create     exec       history    import     kill       logout     node       port       push       rm         save       service    stats      system     trust      version
build      container  diff       export     image      info       load       logs       pause      ps         rename     rmi        search     stack      stop       tag        unpause    volume
commit     cp         events     help       images     inspect    login      network    plugin     pull       restart    run        secret     start      swarm      top        update     wait

kubectl 命令补全

# linux
source <(kubectl completion bash)
echo "source <(kubectl completion bash)" >> ~/.bashrc
#或者
echo "source <(kubectl completion bash)" >> /etc/profile

# mac 
source <(kubectl completion bash)
# 测试
[root@node02 ~]# kubectl tab键
annotate       apply          autoscale      completion     cordon         delete         drain          explain        kustomize      options        port-forward   rollout        set            uncordon
api-resources  attach         certificate    config         cp             describe       edit           expose         label          patch          proxy          run            taint          version
api-versions   auth           cluster-info   convert        create         diff           exec           get            logs           plugin         replace        scale          top            wait

本文标题:Kuberneteskubectl命令自动补全
当前路径:http://shouzuofang.com/article/gpdoso.html

其他资讯