k8s出现error: no configuration has been provided, try setting KUBERNETES_MASTER environment variable

给你一囗甜甜゛ 提交于 2020-04-24 02:32:38

  k8s使用kubectl出现以下错误

kubectl get cs

error: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
  

./kubectl version
error: Missing or incomplete configuration info.  Please point to an existing, complete config file:

  1. Via the command-line flag --kubeconfig
  2. Via the KUBECONFIG environment variable
  3. In your home directory as ~/.kube/config

   原因:使用了k8s18.0的版本,版本不对,使用低一点版本k8s例如1.17.4

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!