I am trying to setup CI/CD pipeline where I am trying to pull the image form docker private repo and its failing while creating the deployment via kubernetes with below error:
Failed to pull image "34.125.222.46:8083/springapp:69": rpc error: code = Unknown desc = failed to pull and unpack image "34.125.222.46:8083/springapp:69": failed to resolve reference "34.125.222.46:8083/springapp:69": failed to do request: Head "https://34.125.222.46:8083/v2/springapp/manifests/69": http: server gave HTTP response to HTTPS client
But I am able to pull the image using docker pull 34.125.222.46:8083/springapp:69
.
I have added the nexus repo url in daemon.json as insecure registry as below
"insecure-registries":["34.125.222.46:8083"]
and also I have created a secret named as registry-secret which has the nexus repo url , username and password which then I referred into k8s deployment manifest file.
Can anyone help me with this issue please. Thanks in advance.
I tried create a deployment using the images pushed to my nexus repo but the deployment is failing as it is unable to pull the image. whereas I am successfully able to pull the image using docker pull.
I have found the solution for this issue. My kubernetes container runtime was containerd which I am not sure why instead docker as I have not installed containerd. So I had to update the config.toml for containerd to refer the nexus registry. Post that I was able to pull the image from nexus registry successfully.