<p>I have a docker private registry.Now I want to pull image in minikube</p>
<pre><code>kubectl run test --image=docker-registry.localdomain/others/test:latest --port=8077 --generator=run/v1
</code></pre>
<p>but I get an error</p>
<pre><code>Failed to pull image &quot;docker-registry.localdomain/others/test:latest&quot;: rpc error: code = Unknown desc = Error response from daemon: Get &quot;https://docker-registry.localdomain/v2/&quot;: x509: certificate relies on legacy Common Name field, use SANs or temporarily enable Common Name matching with GODEBUG=x509ignoreCN=0.
</code></pre>
<p>And I have try</p>
<pre><code>export GODEBUG=x509ignoreCN=0; kubectl run test --image=docker-registry.localdomain/others/test:latest --port=8077 --generator=run/v1
</code></pre>
<p>But I still get the same error.</p>
<p>So how can I deploy this image by minikube?</p>
<p>PS: I can pull this image by <code>docker pull</code></p>

bin381
<p>Solution :<br>
1.Create new certificates in docker registry using : <br></p>
<pre><code>openssl req -x509 -out registry.crt -keyout registry.key -days 1825 \
  -newkey rsa:2048 -nodes -sha256 \
  -subj '/CN=your-retistry.com' -extensions EXT -config &lt;( \
   printf &quot;[dn]\nCN=your-retistry.com\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:your-retistry.com\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth&quot;)
</code></pre>
<p><a href="https://letsencrypt.org/docs/certificates-for-localhost/#making-and-trusting-your-own-certificates" rel="nofollow noreferrer">Reference</a></p>
