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