verma_neeraj
verma_neeraj

Reputation: 21

Kubernetes UI: error in kubectl proxy

I am trying to run kubernetes User Interface. 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/

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. Suggest a clean way to get UI.

Upvotes: 0

Views: 7720

Answers (3)

Ajay Kumar
Ajay Kumar

Reputation: 5243

It's might help for a beginner who stuck here and getting below message in kubenetes CLR.

enter image description here

Upvotes: 1

Vincent De Smet
Vincent De Smet

Reputation: 4979

when you did kubectl config delete-context cluster51, this deleted the context from your ~/.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.

Seems there is something (config set-credentials?) missing in these steps:

$ 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?

Upvotes: 4

Marco Lamina
Marco Lamina

Reputation: 3644

kubectl config delete-cluster my-cluster doesn't delete your cluster, it only removes the entry from your kubectl configuration. The error you are getting suggests that you need to configure kubectl correctly in order to use it with your cluster. I suggest you read the kubectl documentation.

Upvotes: -1

Related Questions