美文网首页Kubernetes
k8s之kubectl命令自动补全

k8s之kubectl命令自动补全

作者: rushui | 来源:发表于2020-11-27 17:18 被阅读0次

    k8s 命令自动补全

    yum install -y epel-release bash-completion
    source /usr/share/bash-completion/bash_completion
    source <(kubectl completion bash)
    echo "source <(kubectl completion bash)" >> ~/.bashrc
    

    或者

    yum install -y epel-release bash-completion
    cp /usr/share/bash-completion/completions/docker /etc/bash_completion.d/
    systemctl enable --now docker
    

    在mac上

    brew install bash-completion
    source $(brew --prefix)/etc/bash_completion
    source <(kubectl completion bash)
    

    相关文章

      网友评论

        本文标题:k8s之kubectl命令自动补全

        本文链接:https://www.haomeiwen.com/subject/apoxwktx.html