<p>I am trying to setup Kubernetes on Ubuntu 18.04 by following <a href="https://phoenixnap.com/kb/install-kubernetes-on-ubuntu" rel="noreferrer">this article</a>.</p>

<p>Everything works fine but when I am trying to access local Kubernetes dashboard then it shows empty and nothing is visible like pods,services &amp; deployments. </p>

<p>However when I am running <code>$&gt; kubectl get pods,svc,deployments</code> then it shows following output.If command line is showing all the details why I am seeing empty Kubernetes dashboard? </p>

<p>I already ran following commands</p>

<pre><code>$&gt; kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml

$&gt; kubectl proxy
</code></pre>

<p>Am I missing any configuration here? Any suggestions to fix this issue?</p>

<pre><code>$&gt; kubectl get pods --all-namespaces
NAMESPACE              NAME                                         READY   STATUS    RESTARTS   AGE

kubernetes-dashboard   dashboard-metrics-scraper-76585494d8-4rrdp   1/1     Running   3          46h
kubernetes-dashboard   kubernetes-dashboard-5996555fd8-sxgxf        1/1     Running   16         46h
</code></pre>

<p>After looking at the notification section, found these errors</p>

<blockquote>
  <ol>
  <li><p>events is forbidden: User
  "system:serviceaccount:kubernetes-dashboard:admin-user" cannot list
  resource "events" in API group "" in the namespace "default"</p></li>
  <li><p>pods is forbidden: User
  "system:serviceaccount:kubernetes-dashboard:admin-user" cannot list
  resource "pods" in API group "" in the namespace "default"</p></li>
  </ol>
</blockquote>

<hr>

<p><strong>Update 1:</strong></p>

<p>its working now after applying RBAC   kubectl apply -f <a href="https://gist.github.com/chukaofili/9e94d966e73566eba5abdca7ccb067e6" rel="noreferrer">filename.yml</a></p>

<pre><code>apiVersion: v1
kind: ServiceAccount
metadata:
  name: admin-user
  namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: admin-user
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
- kind: ServiceAccount
  name: admin-user
  namespace: kube-system
</code></pre>

<p>You probably need to bind the dashboard service account to the cluster admin role:</p>

<p><code>kubectl create clusterrolebinding dashboard-admin-sa 
--clusterrole=cluster-admin --serviceaccount=default:dashboard-admin-sa</code></p>

<p>Otherwise, the dashboard services account doesn't have access to the data that would populate the dashboard.</p>
