Microk8s ctr --debug images pull: http server gave http response to https client

I have issue http server gave http response to https client
I have microk8s and docker-registry in another server.


microk8s ctr --debug images pull xx.yy.zz.hh:53680/superset:1.0.1
DEBU[0000] fetching image=“xx.yy.zz.hh:53680/superset:1.0.1”
DEBU[0000] resolving
DEBU[0000] do request request.headers=map[Accept:[application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json, *]] request.method=HEAD url=“https://xx.yy.zz.hh:53680/v2/superset/manifests/1.0.1
ctr: failed to resolve reference “xx.yy.zz.hh:53680/superset:1.0.1”: failed to do request: Head “https://xx.yy.zz.hh:53680/v2/superset/manifests/1.0.1”: http: server gave HTTP response to HTTPS client

docker pull xx.yy.zz.hh:53680/superset:1.0.1
1.0.1: Pulling from superset
e22122b926a1: Already exists f29e09ae8373: Already exists e319e3daef68: Already exists e499244fe254: Already exists 5a6ebed20e89: Already exists 56b703a5a371: Already exists dec810778c22: Already exists 505aac614a24: Already exists 36deae172a15: Already exists 57f0cd5fb1af: Pull complete 5c2f7caf9372: Pull complete a56f355c12d6: Pull complete f1ce851955d8: Pull complete c53041a1dd95: Pull complete 04cb2d4e01a9: Pull complete a35bdd8f3673: Pull complete dd93c536bc49: Pull complete ddd32d43306d: Pull complete 9317d3920695: Pull complete 1cfb144dc6c2: Pull complete Digest: sha256:327175b4f9d766786deb9f45dacbbf8cbc3c5a6d04a63cc6a23f5a9bb60b8810
Status: Downloaded newer image for xx.yy.zz.hh:53680/superset:1.0.1

Logs microk8s

Type Reason Age From Message

Normal Scheduled 33s default-scheduler Successfully assigned default/superset-666cdb4b9f-r7dbq to ubuntu1804
Normal Pulled 32s kubelet Container image “busybox:latest” already present on machine
Normal Created 32s kubelet Created container wait-for-postgres
Normal Started 31s kubelet Started container wait-for-postgres
Normal Pulling 1s kubelet Pulling image “xx.yy.zz.hh:53680/superset:1.0.1”
Warning Failed 1s kubelet Failed to pull image “xx.yy.zz.hh:53680/superset:1.0.1”: rpc error: code = Unknown desc = failed to resolve image “xx.yy.zz.hh:53680/superset:1.0.1”: no available registry endpoint: failed to do request: Head “https://xx.yy.zz.hh:53680/v2/superset/manifests/1.0.1”: http: server gave HTTP response to HTTPS client
Warning Failed 1s kubelet Error: ErrImagePull

Hi you can check how to use private registry in the microk8s docs site MicroK8s - Working with a private registry
Hope this helps.