https://kubernetes.io/zh-cn/docs/tasks/tools/install-kubectl-linux/ 官网

kubectl#首先下载此文件

install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl #安装
kubectl completion bash #补全命令
kubectl completion bash | sudo tee /etc/bash_completion.d/kubectl > /dev/null
chmod a+r /etc/bash_completion.d/kubectl

或者

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

k8s镜像

docker pull kubernetesui/dashboard