<p>I practice about kubernetes using minikube</p>

<p>I make docker-registry as a pods and I create docker-registry service</p>

<p><strong>edit /etc/docker/daemon.json</strong></p>

<pre><code>{
"insecure-registries":["192.168.99.100:30050"]
}
</code></pre>

<p><strong>edit openssl.conf</strong></p>

<pre><code>[v3_req]
subjectAltName = IP:192.168.99.100
</code></pre>

<p><strong>And I make certificate</strong></p>

<pre><code>openssl genrsa -out my.crt
openssl req -x509 -new -nodes -key my.key -subj "CN=192.168.99.100:30050" -days 5000 -out my.crt
</code></pre>

<p><strong>create registry-tls-secret</strong></p>

<pre><code>kubectl create secret generic registry-tls-secret --from-file=my.crt=my.crt --from-file=my.key=my.key
</code></pre>

<p><strong>and make directory and copy my.crt file into the directory</strong></p>

<pre><code>/etc/docker/certs.d/192.168.99.100:30050
</code></pre>

<p>So I can push &amp; pull 192.168.99.100:30050/[image]:[tag] on the host</p>

<p>And After I try to make hello-world pods</p>

<p>hello-world image is into the docker-registry(192.168.99.100:30050) already</p>

<p>I create secrets docker-registry regcred</p>

<pre><code>kubectl create secret docker-registry regcred --docker-server=192.168.99.100:30050 --docker-usernmae=&lt;user-name&gt; --docker-password=&lt;user-password&gt; --docker-email=&lt;user-email&gt;
</code></pre>

<p>and write helloworld-deployment.yaml</p>

<pre><code>...
    image: 192.168.99.100:30050/hello-world:v1
...
imagePullSecrets:
  -name: regcred
...
</code></pre>

<p>Finally I apply helloworld-deployment.yaml
But I got an error message that </p>

<pre><code>Failed to pull image "192.168.99.100:30050/hello-world:v1": rpc error: code = Unknown desc = Error response from daemon: Get https://192.168.99.100:30050/v2/: x509: certificate signed by unknown authority
</code></pre>

<p><strong>I don't really what I'm missing... please help me...</strong></p>

fuzes
<p>There is no standard for storing a port number in the certificate so Common Name of the certificate should not contain a port. Create Certificate with <code>CN=192.168.99.100</code> and repeat same steps. For more information on common name refer <a href="https://support.dnsimple.com/articles/what-is-common-name/" rel="nofollow noreferrer">here</a>.</p>

<p>Make sure you Copy the certificate data to <code>/etc/docker/certs.d/192.168.99.100:30050/ca.crt</code>.</p>
