# 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
# 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命令自動補全
網(wǎng)頁路徑:http://www.chinadenli.net/article30/gpdoso.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供建站公司、品牌網(wǎng)站建設、搜索引擎優(yōu)化、品牌網(wǎng)站制作、用戶體驗、營銷型網(wǎng)站建設
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)