Nginx-Ingress: Docker Registry behind Ingress - docker push don't work #2444
Comments
@muffin87 what ingress controller and version are you using? |
@aledbf: I tried several versions:
I also tried the other controller from https://github.com/nginxinc/kubernetes-ingress |
@muffin87 the Add the annotation |
@muffin87 in the ingress rule the service |
@aledbf
|
@andiMenge please switch to the real docker registry to verify you can push an image (test the annotation is working) |
@aledbf We tried this, with the same results. Actually we just implemented the nginx-for-auth just to see if it makes a difference. If I bypass the ingress-controller and push directly to the |
@andiMenge please post the output of |
@aledbf I switched back to our old and simpler config. The setup looks now like this:
ingress-controller log
curl -vkL -u user:pw http://registry.censored/v2/
ingress-controller config
ingress.yml
service.yml
deployment.yml
|
@muffin87 from the log and the curl output this is working. Did you configured your docker client to use |
@aledbf in this case: yes, For debugging reasons I am bypassing the F5 so I have to use the insecure registry. |
@aledbf this is what we can see in the ingress-controller logs while doing a
I am not sure how a |
@andiMenge please check the docker-registry logs. I think you will find the same 404 error. If that is the case then the registry is returning the error, not the ingress controller. |
@aledbf you are right, the 404 is from the registry. Strange thing is, if I bypass the ingress, This is what I get if I try to pull (currently there is no valid image inside the registry)
I will do some tests with valid images inside the registry later... |
This is what it looks like from inside the registry: my earlier push of the openjdk image was recognised...
|
the issue was a misconfiguration in the registry that caused redirecting issues in the ingress if set properly, the ingress works fine |
@andiMenge I have the same issue. Can you give some more information how you solved this problem? |
You have to set the right URL in your registry config (config.yml). Example: Your registry should be reachable under https://my-awesome-registry.myproject.de Registry config:
And you also have to set this URL in your ingress manifest. K8s ingress file:
|
I push docker image to registry behind nginx ingress and meet the error: blob unknown to registry. |
@muffin87 @shenshouer I will add an example to show how is possible to expose a docker registry running in the cluster using kube-lego without limit in the uploads. |
I think the |
It's |
…on for docker-registry, see kubernetes-retired/contrib#2444
Hi everyone,
im running K8s version 1.5.2 on CentOS.
I wanted to deploy a vanilla docker registry and expose the service with Nginx Ingress controller.
Issue
docker push
does not work with the nginx-ingress-controller in front of the docker-registry.It seems to me that something in the nginx-ingress-controller config is blocking the
docker push
payload upload (tar file).Any idea whats happening here and how I can solve this?
Error Message:
docker-client:
Error: Status 404 trying to push repository nginx: "404 page not found\n"
dockerd
Upload failed: EOF
nginx-ingress log:
Setup
dockerd -> nginx-ingress -> k8s-service-object -> nginx-for-auth -> registry
docker push
through the nginx results in error.k8s-service-object
via NodePort works finedocker login
works finedocker push
manifest files end up in the registry fineConfigs
rendered nginx-config
registry ingress conf
The text was updated successfully, but these errors were encountered: