<p>So I have a Kubernetes cluster which is connected to a private docker registry.
One of my nodes in Kubernetes keeps failing at pulling an image. So I went into the node and tried to pull the image manually.
When I try to pull the image, it fails.
I get the following error:
filesystem layer verification failed for digest sha256:...</p>
<p>I tried the following post, but no solution in there worked:
<a href="https://stackoverflow.com/questions/34448975/filesystem-layer-verification-failed-for-digest">filesystem layer verification failed for digest</a></p>

ARR
<p>I have a private docker registry, a layer was failing for verification right after it was downloaded, none of the above solutions worked for me.</p>
<p>I did the following, delete the image and specific layer from the private docker registry. Restart the private docker registry. Then rebuild and push the image again. It should work afterwards.</p>
<p>To remove a tag from a private docker registry I use the following script (Python):</p>
<pre><code>image = &quot;yourimage&quot;
tag = &quot;yourtag&quot;
host = &quot;https://yourhost:5000&quot; # change to http if you have no ssl
username = &quot;yourusername&quot;
password = &quot;yourpassword&quot;
res = requests.get(&quot;{}/v2/{}/manifests/{}&quot;.format(host, image, tag), auth=HTTPBasicAuth(username, password), verify=False, headers={
        &quot;Accept&quot;: &quot;application/vnd.docker.distribution.manifest.v2+json&quot;
    })
digest = res.headers.get(&quot;Docker-Content-Digest&quot;).replace('&quot;', &quot;&quot;)
res = requests.delete(&quot;{}/v2/{}/manifests/{}&quot;.format(host, image, digest), auth=HTTPBasicAuth(username, password), verify=False)
    print(res.status_code)
</code></pre>
<p>to remove the blob, your blob digest is the sha256:.... that fails at verification</p>
<pre><code>image = &quot;yourimage&quot;
host = &quot;https://yourhost:5000&quot; # change to http if you have no ssl
username = &quot;yourusername&quot;
password = &quot;yourpassword&quot;
blob_digest = &quot;yourblobdigest&quot;
res = requests.delete(&quot;{}/v2/{}/blobs/{}&quot;.format(host, image, blob_digest), auth=HTTPBasicAuth(username, password),
                      verify=False)
</code></pre>
<p>after you have finished this go to your container of your private docker registry and remove the image like this:</p>
<pre><code>rm /var/lib/registry/docker/registry/v2/repositories/your-repository-name
</code></pre>
<p>Exit your docker registry and restart your private docker registry container. Build and push the image and it should all go fine when when you pull again.</p>
