<p>I am trying to configure SSL for the Kubernetes Dashboard. Unfortunately I receive the following error:</p>
<pre><code>2020/07/16 11:25:44 Creating in-cluster Sidecar client
2020/07/16 11:25:44 Error while loading dashboard server certificates. Reason: open /certs/tls.crt: no such file or directory
</code></pre>
<pre><code>volumeMounts:
            - name: certificates
              mountPath: /certs
              # Create on-disk volume to store exec logs
</code></pre>
<p>I think that /certs should be mounted, but where should it be mounted?</p>

<p>Certificates are stored as <a href="https://kubernetes.io/docs/concepts/configuration/secret/" rel="nofollow noreferrer"><code>secrets</code></a>. Then  <code>secret</code> can be used and mounted in a <code>deployment</code>.</p>
<p>So in your example it would look something like this:</p>
<pre><code>...
          volumeMounts:
            - name: certificates
              mountPath: /certs
              # Create on-disk volume to store exec logs
...
      volumes:
        - name: certificates
          secret:
            secretName: certificates
...
</code></pre>
<p>This is just a short snipped of the whole process of setting up Kubernetes Dashboard v2.0.0 with <a href="https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml" rel="nofollow noreferrer">recommended.yaml</a>.</p>
<p>If you did used the <a href="https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml" rel="nofollow noreferrer"><code>recommended.yaml</code></a> then certs are created automatically and stored in memory. Deployment is being created with <code>args</code> : <code>-auto-generate-certificates</code></p>
<p>I also recommend reading <a href="https://itnext.io/how-to-expose-your-kubernetes-dashboard-with-cert-manager-422ab1e3bf30" rel="nofollow noreferrer">How to expose your Kubernetes Dashboard with cert-manager</a> as it might be helpful to you.</p>
<p>There already was an issue submitted with a simmilar problem as yours <a href="https://github.com/kubernetes/dashboard/issues/2518" rel="nofollow noreferrer">Couldn't read CA certificate: open : no such file or directory #2518</a> but it's regarding Kubernetes v1.7.5</p>
<p>If you have any more issues let me know I'll update the answer if you provide more details.</p>
