<p>After installing Rancher Desktop on macOS 13.2.1 (Apple M1) I walk through the <a href="https://docs.rancherdesktop.io/how-to-guides/hello-world-example" rel="nofollow noreferrer">Hello World</a> documentation. During the &quot;Deploy to Kubernetes&quot; part I run into this problem:</p>
<pre class="lang-bash prettyprint-override"><code>$ kubectl run hello-world --image=nginx-helloworld:latest --image-pull-policy=Never --port=80 
I0306 08:42:03.954011    9988 versioner.go:58] Get &quot;https://127.0.0.1:6443/version?timeout=5s&quot;: x509: certificate signed by unknown authority
E0306 08:42:04.038118    9988 memcache.go:238] couldn't get current server API group list: Get &quot;https://127.0.0.1:6443/api?timeout=32s&quot;: x509: certificate signed by unknown authority
Unable to connect to the server: x509: certificate signed by unknown authority
</code></pre>
<p>I kind of understand the error but I don't know how to fix it properly. I followed all the steps in the documentation.</p>

wintermeyer
<p>The error you are getting is &quot;Unable to connect to the server: x509: certificate signed by unknown authority&quot;.</p>
<p>As per this <a href="https://ranchermanager.docs.rancher.com/v2.5/getting-started/installation-and-upgrade/resources/custom-ca-root-certificates" rel="nofollow noreferrer">document</a></p>
<blockquote>
<p>Services that Rancher needs to access are sometimes configured with a
certificate from a custom/internal CA root, also known as self signed
certificate. If the presented certificate from the service cannot be
validated by Rancher, the following error displays: <code>x509: certificate signed by unknown authority.</code></p>
<p>To validate the certificate, the CA root certificates need to be added
to Rancher. As Rancher is written in Go, we can use the environment
variable <code>SSL_CERT_DIR</code> to point to the directory where the CA root
certificates are located in the container. The CA root certificates
directory can be mounted using the Docker volume option (<code>-v host-source-directory:container-destination-directory</code>) when starting
the Rancher container.</p>
</blockquote>
<p>Refer to this official <a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/#tls-certificate-errors" rel="nofollow noreferrer">document</a>  for more information.</p>
