You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
274 B
23 lines
274 B
3 years ago
|
# kubectl 命令自动填充配置
|
||
|
|
||
|
安装依赖
|
||
|
|
||
|
```bash
|
||
|
yum install -y bash-completion
|
||
|
```
|
||
|
|
||
|
生成自动完成配置
|
||
|
|
||
|
```bash
|
||
|
kubectl completion bash >.kubectl
|
||
|
```
|
||
|
|
||
|
添加配置到profile
|
||
|
|
||
|
```bash
|
||
|
cat <<EOF >>~/.bashrc
|
||
|
if [ -f ~/.kubectl ];then
|
||
|
. ~/.kubectl
|
||
|
fi
|
||
|
EOF
|
||
|
```
|