# Problems with Insecure registry

**URL:** <https://discuss.kubernetes.io/t/problems-with-insecure-registry/28282>\
**Category:** General Discussions\
**Created:** [May 16, 2024, 9:28am UTC](https://discuss.kubernetes.io/t/problems-with-insecure-registry/28282 "2024-05-16T09:28:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TennyKs](https://avatars.discourse-cdn.com/v4/letter/t/ecccb3/32.png) [@TennyKs](https://discuss.kubernetes.io/u/TennyKs)\
**Post date:** [May 16, 2024, 9:28am UTC](https://discuss.kubernetes.io/t/problems-with-insecure-registry/28282/1 "2024-05-16T09:28:24Z")

</div>

### Cluster information:

Kubernetes version: 1.30.0  
Installation method: APT  
Host OS: Debian 12  
CNI and version: Calico, 3.25  
CRI and version: Docker, 26.1.1

Hi everyone, I am deploying my first Kubernetes cluster, and i ran into some issues while deploying my first job. I use Kubeadm.  
I have deployed a local docker registry on another pc, and push a simple docker image on it (my-python-app, an hello-world).

This is an insecure registry, and i believe it’s the core of the problem. My registry do not require auth.  
On the cluster, i can do a docker pull after adding the docker repo as insecure in /etc/docker/daemon.json.  
The problem is the job cannot pull the image even with this configuration.

The job file :

```yaml
apiVersion: batch/v1
kind: Job
metadata:
  name: my-python-app
spec:
  completions: 1
  parallelism: 1
  template:
    spec:
      containers:
      - name: my-python-app
        image: 192.168.30.33:5000/my-python-app
      restartPolicy: Never

```

The error :

```auto
Failed to pull image "192.168.30.33:5000/my-python-app": failed to pull and unpack image "192.168.30.33:5000/my-python-app:latest": failed to resolve reference "192.168.30.33:5000/my-python-app:latest": failed to do request: Head "https://192.168.30.33:5000/v2/my-python-app/manifests/latest": http: server gave HTTP response to HTTPS client

```

I am a bit stuck with this error, and I cannot find anything related to this.  
Thanks for your time !

---

<div class="post-metadata">

**Author:** ![modulespanel](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@modulespanel](https://discuss.kubernetes.io/u/modulespanel)\
**Post date:** [June 16, 2024, 10:19am UTC](https://discuss.kubernetes.io/t/problems-with-insecure-registry/28282/3 "2024-06-16T10:19:23Z")

</div>

Can you open your /etc/default/docker.json

and add an entry

```auto
{
    "insecure-registries": ["192.168.30.33:5000"]
}

```

Then it should work

---

<div class="post-metadata">

**Author:** ![SAURAV\_SHARMA](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/saurav_sharma/32/16572_2.png) [@SAURAV\_SHARMA](https://discuss.kubernetes.io/u/SAURAV_SHARMA)\
**Post date:** [December 30, 2024, 10:10pm UTC](https://discuss.kubernetes.io/t/problems-with-insecure-registry/28282/4 "2024-12-30T22:10:03Z")

</div>

brother i tried this even i tried pulling docker to check if it is getting pulled manually it worked but on k8s it is giving this error. I’am not able to get any solution till date.

---

<div class="post-metadata">

**Author:** ![SAURAV\_SHARMA](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/saurav_sharma/32/16572_2.png) [@SAURAV\_SHARMA](https://discuss.kubernetes.io/u/SAURAV_SHARMA)\
**Post date:** [December 30, 2024, 10:10pm UTC](https://discuss.kubernetes.io/t/problems-with-insecure-registry/28282/5 "2024-12-30T22:10:49Z")

</div>

brother did you get any solution?
