error: Couldn't get available api versions from server: couldn't get version/kind; json parse error: json: cannot unmarshal string into Go value of type struct { APIVersion string "json:\"apiVersion,omitempty\""; Kind string "json:\"kind,omitempty\"" }
最佳答案
我今天早上花了一些时间来解决这个确切的错误,当kubeconfig文件不是有效的Yaml文件时,看起来好像抛出了此错误。
在我的特殊情况下,文件的问题是:
配置文件是自动生成的,修复了两个问题后kubectl可以使用它
关于kubernetes - 使用kubectl命令时Kubernetes出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55264567/