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


  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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM