<p>On AKS, I am getting a very strange error pulling an image from a public docker repository: <code>Failed to pull image &quot;jeremysv/eventstore-proxy:latest&quot;: rpc error: code = InvalidArgument desc = failed to pull and unpack image &quot;docker.io/jeremysv/eventstore-proxy:latest&quot;: unable to fetch descriptor (sha256:46e5822176985eff4826449b3e4d4de5589aa012847153a4a2e134d216b7b28a) which reports content size of zero: invalid argument</code></p>
<p>I have tried deleting and recreating the AKS cluster, however the error is still there.</p>
<p>Using <code>docker pull</code> on my local machine works fine.</p>

<p>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?</p>
<p>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: <a href="https://faultbucket.ca/2022/05/aks-image-pull-failed-from-proget/" rel="nofollow noreferrer">AKS image pull failed</a> and <a href="https://learn.microsoft.com/en-us/answers/questions/653640/kubernetes-in-aks-error-while-pulling-image-from-p.html" rel="nofollow noreferrer">Kubernetes (in AKS) error while pulling image</a>, and it seems to come from:</p>
<blockquote>
<p>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.</p>
</blockquote>
<p>So Azure is working on it, but it isn't clear if it's going to change it.</p>
<p>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.</p>
<p>A simple way to overcome this that comes in mind is to have your image in another repo, in Azure Container Registry for example.</p>
