ZBLOG

[root@k8s-master bin]# kubectl config view --minify | grep file error: current-context must exist in order to minify

这个错误表示当前 kubeconfig 文件中没有设置 current-context。您需要先设置一个 current-context 才能使用 --minify 选项。

您可以通过运行以下命令来设置当前 context:

  1. kubectl config use-context <context-name>

其中,<context-name> 是您想要设置为当前 context 的名称。您可以在 kubeconfig 文件中查找可用的 context 名称,或者运行以下命令列出所有可用的 context 名称:

  1. kubectl config get-contexts

一旦您设置了 current-context,就可以再次运行 kubectl config view --minify | grep file 命令来检查 kubeconfig 文件路径,并确认 API Server 地址和证书信息是否正确配置了。

本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:https://golang.0voice.com/?id=4953

分享:
扫描分享到社交APP
上一篇
下一篇
发表列表
游客 游客
此处应有掌声~
评论列表

还没有评论,快来说点什么吧~

联系我们

在线咨询: 点击这里给我发消息

微信号:3007537140

上班时间: 10:30-22:30

关注我们
x

注册

已经有帐号?