synchronization
This commit is contained in:
		
							
								
								
									
										26
									
								
								部署文档/Kubectl工具安装/Kubectl安装命令自动补全工具.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								部署文档/Kubectl工具安装/Kubectl安装命令自动补全工具.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
			
		||||
> 本文作者:丁辉
 | 
			
		||||
 | 
			
		||||
# Kubectl安装命令自动补全工具
 | 
			
		||||
 | 
			
		||||
[官方文档](https://kubernetes.io/zh-cn/docs/tasks/tools/install-kubectl-linux/#optional-kubectl-configurations)
 | 
			
		||||
 | 
			
		||||
## 安装 bash-completion
 | 
			
		||||
 | 
			
		||||
- Ubuntu
 | 
			
		||||
 | 
			
		||||
  ```bash
 | 
			
		||||
  apt-get install bash-completion
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
- Centos
 | 
			
		||||
 | 
			
		||||
  ```bash
 | 
			
		||||
  yum install bash-completion
 | 
			
		||||
  ```
 | 
			
		||||
 | 
			
		||||
## 启动 kubectl 自动补全功能
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
echo 'source <(kubectl completion bash)' >>~/.bashrc
 | 
			
		||||
source ~/.bashrc
 | 
			
		||||
```
 | 
			
		||||
		Reference in New Issue
	
	Block a user