<p>I am using <code>create_namespaced_pod()</code> of the <code>kubernetes-client</code> package to dynamically create kubernetes pods from docker images that are in an images registry.</p>
<p>How do I check if the Docker image exists in the registry before calling <code>create_namespaced_pod()</code>? I want to avoid creating the pod and then having to deal with error messages.</p>

Ouss
<p>you may use <a href="https://docs.docker.com/engine/reference/commandline/registry_ls/" rel="nofollow noreferrer"><code>docker registry ls</code></a> to list the contents of your registry and parse for your image specifically. if <code>ls</code> isn't working for you, you can try a simple HTTP call to the image's URL in the registry, and check the response code.</p>
