![](/img/trans.png)
[英]Kubernetes/kubectl: unable to connect to a server to handle “pods”
[英]Kubernetes UI: error in kubectl proxy
我正在嘗試運行kubernetes用戶界面。 我遇到錯誤
[root@ts_kubernetes_setup gcp-live-k8s-visualizer]# kubectl proxy
Error in configuration: context was not found for specified context: cluster51
我遵循了這個http://kubecloud.io/guide-setting-up-visualizer-for-kubernetes/
然后我嘗試使用刪除該群集
kubectl config delete-cluster my-cluster
kubectl config delete-context my-cluster-context
kubectl config unset users.my-cluster-admin
當我嘗試運行kubectl proxy
時執行了最后一步后,出現錯誤。 提出一種獲取UI的干凈方法。
當您執行kubectl config delete-context cluster51
,這將從~/.kube/config
刪除上下文。 因此錯誤:
Error in configuration: context was not found for specified context: cluster51
您可以查看~/.kube/config
文件的內容,或使用kubectl config view
命令來幫助解決此錯誤。
在這些步驟中似乎缺少某些東西( config set-credentials
?):
$ kubectl config set-cluster cluster51 --server=http://192.168.1.51:8080
$ kubectl config set-context cluster51 --cluster=cluster51
$ kubectl config use-context cluster51
如果您沒有運行rpi集群,而只想使用kubernetes可視化工具,我是否建議改用kubernetes / minikube ?
kubectl config delete-cluster my-cluster
不會刪除您的集群,它只會從kubectl
配置中刪除該條目。 您收到的錯誤表明您需要正確配置kubectl才能在群集中使用它。 我建議您閱讀kubectl文檔 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.