macos - 错误 : there was a problem with the editor "vi" -- while trying to edit a deployment file in a cluster

标签 macos kubernetes yaml azure-aks vi

遇到这个错误error: there was a problem with the editor "vi" when trying to change a deployment file in the Kubernetes cluster (AKS)

kubectl edit deploy xxxxx -o yaml

退出文件后,抛出以下错误且未应用任何更改。

此问题仅在尝试编辑此特定部署时出现。似乎对其他文件更改工作正常

几张截图...

enter image description here

enter image description here

最佳答案

问题是 kubectl 使用的是 vi 而不是 vim。

解析运行(或添加到您的 .bashrc 或 .bash_profile):

export EDITOR=vim

然后运行您的 kubectl edit 命令。

享受吧。

关于macos - 错误 : there was a problem with the editor "vi" -- while trying to edit a deployment file in a cluster,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69363317/

相关文章:

python - 无法在 Mac 中的 python 启动器中打开绘图

python - 将 YAML 文件读取为列表

node.js - hubot脚本加载yaml文件,不适用于相对路径

kubernetes - 子字符串匹配条件时的 Argo 工作流程

autocomplete - 我可以在 zsh 中使用 kubectl 自动补全功能吗?

postgresql - 在 Kubernetes 集群中使用 pgAdmin 访问数据库

ruby-on-rails - Ruby on Rails :serialize UTF8 problem

python - Mac OS 上多次安装 Python - 无法安装 pip 包

macos - 在 OS X 上更改 Docker 的存储驱动程序

ruby - 无法通过 rvm bundle install 安装 ffi 1.9.0 - OSX 10.8.4