kubectl命令补全
时间: 2023-09-23 21:02:20 浏览: 207
kubectl 命令备忘单
kubectl命令补全可以提高运维效率,并且在忘记子命令时也可以通过按Tab键来回忆。安装bash命令行自动补全扩展包可以通过以下步骤完成:首先,使用命令`yum -y install bash-completion`安装bash-completion;然后执行命令`source /usr/share/bash-completion/bash_completion`来加载补全功能。然后,加载kubectl completion可以通过执行命令`source <(kubectl completion bash)`来临时生效。如果希望永久生效,可以执行命令`echo "source <(kubectl completion bash)" >> ~/.bashrc`来将其添加到.bashrc文件中。这样,kubectl命令补全就可以在每次打开终端时自动生效了。 [2 [3<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [kubectl 配置命令自动补全](https://blog.csdn.net/weixin_42708432/article/details/118569704)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [kubectl命令补全](https://blog.csdn.net/weixin_44772835/article/details/128222461)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文