简体   繁体   English

Kubernetes UI:kubectl代理错误

[英]Kubernetes UI: error in kubectl proxy

I am trying to run kubernetes User Interface. 我正在尝试运行kubernetes用户界面。 I am getting error 我遇到错误

[root@ts_kubernetes_setup gcp-live-k8s-visualizer]# kubectl proxy
Error in configuration: context was not found for specified context: cluster51

I followed this http://kubecloud.io/guide-setting-up-visualizer-for-kubernetes/ 我遵循了这个http://kubecloud.io/guide-setting-up-visualizer-for-kubernetes/

Then I tried to delete this cluster using 然后我尝试使用删除该群集

kubectl config delete-cluster my-cluster
kubectl config delete-context my-cluster-context
kubectl config unset users.my-cluster-admin

After performing the last step when I am trying to run kubectl proxy I am getting the error. 当我尝试运行kubectl proxy时执行了最后一步后,出现错误。 Suggest a clean way to get UI. 提出一种获取UI的干净方法。

when you did kubectl config delete-context cluster51 , this deleted the context from your ~/.kube/config . 当您执行kubectl config delete-context cluster51 ,这将从~/.kube/config删除上下文。 Hence the error: 因此错误:

Error in configuration: context was not found for specified context: cluster51

you can view the contents of the ~/.kube/config file, or use the kubectl config view command to help troubleshoot this error. 您可以查看~/.kube/config文件的内容,或使用kubectl config view命令来帮助解决此错误。

Seems there is something ( config set-credentials ?) missing in these steps: 在这些步骤中似乎缺少某些东西( 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

If you're not running a rpi cluster and just want to play with kubernetes visualizer, may I suggest to use kubernetes/minikube instead? 如果您没有运行rpi集群,而只想使用kubernetes可视化工具,我是否建议改用kubernetes / minikube

It's might help for a beginner who stuck here and getting below message in kubenetes CLR. 对于坚持在此处并了解kubenetes CLR中消息的初学者而言,这可能会有所帮助。

在此处输入图片说明

kubectl config delete-cluster my-cluster doesn't delete your cluster, it only removes the entry from your kubectl configuration. kubectl config delete-cluster my-cluster不会删除您的集群,它只会从kubectl配置中删除该条目。 The error you are getting suggests that you need to configure kubectl correctly in order to use it with your cluster. 您收到的错误表明您需要正确配置kubectl才能在群集中使用它。 I suggest you read the kubectl documentation . 我建议您阅读kubectl文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM