<p>Trying to install kubernetes dashboard in Ubuntu 16.04 resulting in x509: certificate signed by unknown authority error.</p>

<p>Kubernetes cluster with a single node is running fine and deployments are happening too.</p>

<p>Tried enabling apiserver-host property in kubernetes-dashboard.yaml file without any lock.</p>

<p>kubectl apply -f <a href="https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/deploy/recommended/kubernetes-dashboard.yaml" rel="nofollow noreferrer">https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/deploy/recommended/kubernetes-dashboard.yaml</a>
Unable to connect to the server: x509: certificate signed by unknown authority</p>

<p>Any suggestions.</p>

<p>Output from kubectl get all -n kube-system</p>

<pre><code>NAME                                         READY   STATUS    RESTARTS   AGE
pod/calico-node-6dgkc                        2/2     Running   4          4d23h
pod/calico-node-v8xjr                        2/2     Running   0          2d4h
pod/coredns-fb8b8dccf-8jznp                  1/1     Running   2          4d23h
pod/coredns-fb8b8dccf-pl87d                  1/1     Running   2          4d23h
pod/etcd-ets-kubernetes                      1/1     Running   2          4d23h
pod/kube-apiserver-ets-kubernetes            1/1     Running   2          4d23h
pod/kube-controller-manager-ets-kubernetes   1/1     Running   2          4d23h
pod/kube-proxy-24qjz                         1/1     Running   0          2d4h
pod/kube-proxy-ccqpn                         1/1     Running   2          4d23h
pod/kube-scheduler-ets-kubernetes            1/1     Running   2          4d23h

NAME                   TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)                  AGE
service/calico-typha   ClusterIP   10.110.39.31   &lt;none&gt;        5473/TCP                 4d23h
service/kube-dns       ClusterIP   10.96.0.10     &lt;none&gt;        53/UDP,53/TCP,9153/TCP   4d23h
Error from server (Forbidden): replicationcontrollers is forbidden: User "system:node:ets-kubernetes" cannot list resource "replicationcontrollers" in API group "" in the namespace "kube-system"
Error from server (Forbidden): daemonsets.apps is forbidden: User "system:node:ets-kubernetes" cannot list resource "daemonsets" in API group "apps" in the namespace "kube-system"
Error from server (Forbidden): deployments.apps is forbidden: User "system:node:ets-kubernetes" cannot list resource "deployments" in API group "apps" in the namespace "kube-system"
Error from server (Forbidden): replicasets.apps is forbidden: User "system:node:ets-kubernetes" cannot list resource "replicasets" in API group "apps" in the namespace "kube-system"
Error from server (Forbidden): statefulsets.apps is forbidden: User "system:node:ets-kubernetes" cannot list resource "statefulsets" in API group "apps" in the namespace "kube-system"
Error from server (Forbidden): horizontalpodautoscalers.autoscaling is forbidden: User "system:node:ets-kubernetes" cannot list resource "horizontalpodautoscalers" in API group "autoscaling" in the namespace "kube-system"
Error from server (Forbidden): jobs.batch is forbidden: User "system:node:ets-kubernetes" cannot list resource "jobs" in API group "batch" in the namespace "kube-system"
Error from server (Forbidden): cronjobs.batch is forbidden: User "system:node:ets-kubernetes" cannot list resource "cronjobs" in API group "batch" in the namespace "kube-system"
</code></pre>

<p>Output from kubectl get nodes</p>

<pre><code>NAME             STATUS   ROLES    AGE     VERSION
ets-kubernetes   Ready    master   4d23h   v1.14.1
ets-node         Ready    &lt;none&gt;   2d4h    v1.14.1
</code></pre>

<hr>

<p>Kubectl output.PNG
<a href="https://i.stack.imgur.com/SR4SP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SR4SP.png" alt="enter image description here"></a></p>

<p>Certificate Error.PNG
<a href="https://i.stack.imgur.com/kSs2j.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kSs2j.png" alt="enter image description here"></a></p>

Nishant Kansal
<p>Had the same issue after resetting k8s to defaults while having <code>kubectl proxy</code> running.</p>
<p>Simply restarting <code>kubectl proxy</code> fixed the issue :)</p>
