AKS - Error pulling image from docker hub

Viewed 395

On AKS, I am getting a very strange error pulling an image from a public docker repository: Failed to pull image "jeremysv/eventstore-proxy:latest": rpc error: code = InvalidArgument desc = failed to pull and unpack image "docker.io/jeremysv/eventstore-proxy:latest": unable to fetch descriptor (sha256:46e5822176985eff4826449b3e4d4de5589aa012847153a4a2e134d216b7b28a) which reports content size of zero: invalid argument

I have tried deleting and recreating the AKS cluster, however the error is still there.

Using docker pull on my local machine works fine.

1 Answers

First of all have you been able to pull images from your repo to AKS in the past? If yes, what is the difference between this time and the previous successful one?

If not, I look it up and it seems to be an error for which Azure is aware of. Both of those guys kind of had the same issue as you: AKS image pull failed and Kubernetes (in AKS) error while pulling image, and it seems to come from:

localy Content-Length for HTTP HEAD request (downloading docker image manifets) is OK (real non 0 size), but for HTTP HEAD request (downloading docker image manifets) from Internet, where network traffic is through a Azure proxy, Content-Length is set to 0 and containerd returns an error when pull docker image.

So Azure is working on it, but it isn't clear if it's going to change it.

That being said, those guys tried to pull images from private repo, while your image is public and I was able to pull it too on a VM. So I think that the problem either comes from your syntax (you probably already checked and re-checked it but if you want to have a triple check you can post it here) or from Azure proxying images coming from some repo it doesn't know.

A simple way to overcome this that comes in mind is to have your image in another repo, in Azure Container Registry for example.

Related