K
Q

Kubernetes UI: error in kubectl proxy

February 23, 2017

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.

-- verma_neeraj
linux
docker
kubernetes

3 Answers

February 24, 2017

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?

-- Vincent De Smet
Source: StackOverflow

December 11, 2018

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

enter image description here

-- Ajay Kumar
Source: StackOverflow

February 23, 2017

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.

-- Marco Lamina
Source: StackOverflow