I have recently installed Kubernetes in Ubuntu 16.04 LTS.
But i am unable to access the kube UI. Below are details.
Kubectl Version:
u64@ubuntu64:~$ kubectl version Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-08-31T09:14:02Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-08-31T08:56:23Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Kubectl Config View:
u64@ubuntu64:~$ kubectl config view apiVersion: v1 clusters: - cluster: certificate-authority-data: REDACTED server: https://130.211.115.230 name: amazing-insight-172917_kubernetes contexts: - context: cluster: amazing-insight-172917_kubernetes user: amazing-insight-172917_kubernetes name: amazing-insight-172917_kubernetes current-context: amazing-insight-172917_kubernetes kind: Config preferences: {} users: - name: amazing-insight-172917_kubernetes user: client-certificate-data: REDACTED client-key-data: REDACTED token: GV0sJB4PXYgQofLPypELZeMLakr5bFA6 - name: amazing-insight-172917_kubernetes-basic-auth user: password: opYOctdphtqIBZWE username: admin
When i am trying to access the URL https://130.211.115.230/ui/ i am getitng the error
User "system:anonymous" cannot get path "/ui/".: "No policy matched."
Any help is appreciated.
Your dashboard is up and running. You can access it by executing this command on you workstation:
kubectl --server=https://130.211.115.230/ --insecure-skip-tls-verify --username=admin --password=opYOctdphtqIBZWE proxy
Thereafter http://127.0.0.1/ui
Btw, anyone in the world can go do this as you accidently leaked the credentials.
Try this:
kubectl proxy --port=8001 --kubeconfig=<path-to-kubeconfig>
and then go to 127.0.0.1:8001/ui
.
You can skip the kubeconfig if your kubectl context is correctly set.
This is been rectified by starting the proxy. Below is the command
kubectl proxy
and below is the command output. After wards I am able to access the UI.
Starting to serve on 127.0.0.1:8001
Thanks for all your contributions.
How have you installed Kubernetes on Ubuntu? If it is with kubeadm
it enables RBAC by default with prevents unprivileged access to the cluster. You need to explicitly grant dashboard access to resources.
As mentioned at https://github.com/kubernetes/dashboard#deployment create the dashboard using the following command which will also setup the RBAC rules:
$ kubectl create -f https://git.io/kube-dashboard
Create the dashboard as follow kubectl create -f https://rawgit.com/kubernetes/dashboard/master/src/deploy/kuber netes-dashboard.yaml
View the username
and password
by running kubectl config view
Access the Dashboard as folow https://<kubernetes-master>/ui
, where <kubernetes-master>
is IP address or domain name of the Kubernetes master
This is a screen shot of the Dashboard I just setup from steps above
https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/