<p>I have three servers:</p>
<pre><code>1 master: 192.168.1.131 k8s
1 node: 192.168.1.132 k8s
1 rancher: 192.168.1.133 rancher 2.6
</code></pre>
<p>I have created a docker image (private registry docker) on the node used <code>192.168.1.132:5000/test.</code>
Both master and node pushed and pulled to the image. But used rancher deploy set image 192.168.1.132:5000/test then error:</p>
<pre><code>Failed to pull image “192.168.1.132:5000/test-demo”: rpc error: code = Unknown desc = failed to pull and unpack image “192.168.1.132:5000/test-demo:latest”: failed to resolve reference “192.168.1.132:5000/test-demo:latest”: failed to do request: Head “https://192.168.1.132:5000/v2/test-demo/manifests/latest”: http: server gave HTTP response to HTTPS client.
</code></pre>
<p>My image used
<code>http</code> not <code>https</code>. But the rancher sends HTTPS.
<a href="https://ibb.co/t2wxbQ8" rel="nofollow noreferrer">This is image problem</a></p>

Trần văn Toán
<p>You may try this out by adding one line to the <strong>daemon.json</strong> file</p>
<p>The configuration file can be found at <em><strong>'C:\ProgramData\Docker\config\daemon.json'</strong></em>. You can create this file if it doesn't already exist.</p>
<pre><code>&quot;insecure-registries&quot;: [
    &quot;192.168.1.132:5000&quot;
]
</code></pre>
<p>Then restart the docker service hope solves the issue.</p>
<p>Raff:</p>
<ol>
<li><a href="https://docs.docker.com/config/daemon/#configure-the-docker-daemon" rel="nofollow noreferrer">Configure the Docker daemon</a></li>
<li><a href="https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-docker/configure-docker-daemon#configure-docker-with-a-configuration-file" rel="nofollow noreferrer">Configure Docker with a configuration file.</a></li>
</ol>
