1

I have been trying to pull image in Kubernetes cluster from self hosted gitlab using insecure registry but it doesn't seem to work. I get below error,

Failed to pull image "registry.server208.com:5050/registry/test_image": rpc error: code = Unknown desc = failed to pull and unpack image "registry.server208.com:5050/registry/test_image:latest": failed to resolve reference "registry.server208.com:5050/registry/test_image:latest": failed to do request: Head https://registry.server208.com:5050/v2/registry/test_image/manifests/latest: http: server gave HTTP response to HTTPS client

I have followed the given solution but it doesn't seem to work.

Kubernetes pull from insecure docker registry

I did add /etc/docker/daemon.json file with insecure-registry config like below

{
  "insecure-registries" : ["registry.server208.com:5050"]
}

And like the above solution also suggested to add same config file in /etc/default/docker.json

I did it but doesn't seem to work.

Below is my Kubernetes deployment file

apiVersion: v1
kind: Pod
metadata:
  name: private-reg
spec:
  containers:
  - name: reg-container
    image: registry.server208.com:5050/registry/test_image
  imagePullSecrets:
  - name: regcred

I'm working on ubuntu18 LTS server.

I want Kubernetes to pull image using HTTP request with the given registry URL. Any suggestion is appreciated. Thanks in advance.

  • That sounds like you need to configure TLS on your registry server. That's not really a programming question, and you might ask another Stack Exchange site like [sf] or [devops.se] for help on that. – David Maze Jul 06 '22 at 10:41

0 Answers0