k8s命令补全

依次执行以下四条命令即可完成k8s的命令补全


yum -y install bash-completion

source /usr/share/bash-completion/bash_completion

source <(kubectl completion bash)

echo "source <(kubectl completion bash)" >> ~/.bashrc

补全效果

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

————————————————
版权声明:本文为CSDN博主「s波塞冬」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/m0_46674735/article/details/114881063

上一篇:Android通过Path实现复杂效果(搜索按钮+时钟的实现 )


下一篇:上传图片到图片服务器上