title: Kubernetes with containerd : http: server gave HTTP response to HTTPS client
body: <p>I am setting up my K8s cluster with container as runtime.
  Now when I am trying to pull a image using :</p>
  <pre><code>sudo ctr image pull 192.168.1.2:5000/my-alpine:latest
  </code></pre>
  <p>It is giving me an error :</p>
  <blockquote>
  <p>ctr: failed to resolve reference &quot;192.168.1.2:5000/my-alpine:latest&quot;: failed to do request: Head <code>https://192.168.1.2:5000/v2/my-alpine/manifests/latest</code>: http: server gave HTTP response to HTTPS client</p>
  </blockquote>
  <p>My /etc/containerd/config.toml</p>
  <pre><code>[plugins.&quot;io.containerd.grpc.v1.cri&quot;.registry]
    [plugins.&quot;io.containerd.grpc.v1.cri&quot;.registry.mirrors]
      [plugins.&quot;io.containerd.grpc.v1.cri&quot;.registry.mirrors.&quot;docker.io&quot;]
        endpoint = [&quot;https://registry-1.docker.io&quot;]
      [plugins.&quot;io.containerd.grpc.v1.cri&quot;.registry.mirrors.&quot;192.168.1.2:5000&quot;]
        endpoint = [&quot;http://192.168.1.2:5000&quot;]
    [plugins.&quot;io.containerd.grpc.v1.cri&quot;.registry.configs]
      [plugins.&quot;io.containerd.grpc.v1.cri&quot;.registry.configs.&quot;192.168.1.2:5000&quot;.tls]
        insecure_skip_verify = true
  </code></pre>
  <p>What am I missing here? When I am pulling an image from Kubernetes deployment and also getting the same error.</p>