Accessing Kubernetes Dashboard

Accessing Kubernetes Dashboard

As of Kubernetes 1.7 the Kubernetes Dashboard has been secured and you might find that it is rather difficult to access it.  In this post, I will show a way to access it if you are having issues.

Kubectl Proxy

First thing to do is setup kubectl to proxy for you:

# kubectl proxy --accept-hosts='^.*$' --address='{your_server_ip}' &

This will let you connect to the dashboard using this url:


You will be presented with a login screen:

Kuberentes Dashboard Login

If you click on skip you may not have permissions to do anything by default.

Giving the Kubernetes Dashboard Service Admin Privileges

This opens up your kubernetes to possible attack so definitely do not do this in production.

Create a new file called dashboard-admin.yaml and add the following code:

kind: ClusterRoleBinding
  name: kubernetes-dashboard
    k8s-app: kubernetes-dashboard
  kind: ClusterRole
  name: cluster-admin
- kind: ServiceAccount
  name: kubernetes-dashboard
  namespace: kube-system

Finally run this command:

# kubectl create -f dashboard-admin.yaml

You can now click on skip and have full privileges to manage your kubernetes cluster.

For more articles on Kubernetes click here.


I hope you have enjoyed this article, if so please leave a comment below.  For more articles, please signup for the AdminTome Blog below.  Also please feel free to share the article to your friends using the buttons to the left.  Thanks again for reading this post.