Use https for accessing Docker private registry

Use https for accessing Docker private registry

I have a private registry, that it's accessed through the https protocol. But Kubernetes + Docker, always tries to use the http protocol&nbsp;<a href="http://myserver.com:8080" target="_blank">http://myserver.com:8080</a>&nbsp;instead of&nbsp;<a href="https://myserver.com:8080" target="_blank">https://myserver.com:8080</a>.

I have a private registry, that it's accessed through the https protocol. But Kubernetes + Docker, always tries to use the http protocol http://myserver.com:8080 instead of https://myserver.com:8080.

How to force https protocol?

Snippet of my yaml file that declares a Pod:

  containers:
    - name: apl
      image: myserver.com:8080/myimage

Details of my environment:

  • CentOS 7.3
  • Docker 18.06
  • Kubernetes (Minikube) 1.13.1

Error message in Kubernetes logs:

  Normal   Pulling    30s (x4 over 2m2s)  kubelet, minikube  pulling image "docker.mydomain.com:30500/vision-ssh"
  Warning  Failed     30s (x4 over 2m2s)  kubelet, minikube  Failed to pull image "docker.mydomain.com:30500/vision-ssh": rpc error: code = Unknown desc = Error response from daemon: Get http://docker.mydomain.com:30500/v2/: net/http: HTTP/1.x transport connection broken: malformed HTTP response "\x15\x03\x01\x00\x02\x02"
  Warning  Failed     30s (x4 over 2m2s)  kubelet, minikube  Error: ErrImagePull
  Warning  Failed     19s (x6 over 2m2s)  kubelet, minikube  Error: ImagePullBackOff
  Normal   BackOff    4s (x7 over 2m2s)   kubelet, minikube  Back-off pulling image "docker.fccma.com:30500/vision-ssh"

If I try to specify the protocol in the name of the image, it complains:

couldn't parse image reference "https://docker.mydomain.com:30500/vision-ssh": invalid reference format


Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

What is the difference between Docker, Kubernetes and Docker Swarm ?

What is the difference between Docker and Kubernetes? And Kubernetes or Docker Swarm? In my video "Docker vs Kubernetes vs Docker Swarm" I compare both Docker and Kubernetes and Kubernetes vs Docker Swarm.

Docker vs. Kubernetes vs. Docker Swarm

What is the difference between Docker and Kubernetes? And Kubernetes or Docker Swarm? Docker vs Kubernetes vs Docker Swarm, I compare both Docker and Kubernetes and Kubernetes vs Docker Swarm. Comparison Docker and Kubernetes. Differences of Kubernetes and Docker Swarm

WordPress in Docker. Part 1: Dockerization

This entry-level guide will tell you why and how to Dockerize your WordPress projects.