docker和k8s命令自动补全

docker的命令补全方式:

    yum install -y epel-release bash-completion
    source /usr/share/bash-completion/completions/docker
    source /usr/share/bash-completion/bash_completion

k8s 命令自动补全
    yum install -y  bash-completion
    source /usr/share/bash-completion/bash_completion
    source <(kubectl completion bash)
    echo "source <(kubectl completion bash)" >> ~/.bashrc

#注意上面有重复命令如果在一台服务器上可省略执行。

你可能感兴趣的:(容器)