<p>I'm attempting to deploy a Docker container to a minikube instance running locally, and getting this error when it attempts to pull(?) the image. The image exists in a self-hosted Docker registry. The image I'm testing with is built with the following Dockerfile:</p>

<pre><code>FROM alpine:latest
ENTRYPOINT ["echo"]
</code></pre>

<p>I'm using the fabric8io <code>kubernetes-client</code> library to create a deployment like so:</p>

<pre><code>// 'kube' is an instance of io.fabric8.kubernetes.client.KubernetesClient
final Deployment deployment = kube.extensions().deployments()
        .createOrReplaceWithNew()
        .withNewMetadata()
            .withName(name)
            .withNamespace("staging")
        .endMetadata()
        .withNewSpec()
            .withReplicas(1)
            .withNewTemplate()
                .withNewMetadata()
                    .addToLabels("app", name)
                .endMetadata()
                .withNewSpec()
                    .addNewImagePullSecret()
                        // "regsecret" is the kubectl-created docker secret
                        .withName("regsecret")
                    .endImagePullSecret()
                    .addNewContainer()
                        .withName(name)
                        .withImage(imageName + ":latest")
                    .endContainer()
                .endSpec()
            .endTemplate()
        .endSpec()
        .done();
</code></pre>

<p>This is all running on Arch Linux, kernel <code>Linux 4.10.9-1-ARCH x86_64 GNU/Linux</code>. Using <code>minikube 0.18.0-1</code> and <code>kubectl-bin 1.6.1-1</code> from the AUR, <code>docker 1:17.04.0-1</code> from the community repositories, and the docker <code>registry</code> container at <code>latest</code> (<code>2.6.1</code> as of writing this). fabric8io <code>kubernetes-client</code> is at version <code>2.2.13</code>. </p>

<p>I have checked:</p>

<ul>
<li>that the self-hosted registry is running over HTTPS correctly</li>
<li>that the image can even be pulled. <code>docker pull</code> and <code>docker run</code> on both the host and inside the minikube VM work exactly as expected</li>
<li>that the image runs. See above</li>
<li>that there aren't any name conflicts / etc. in minikube. I delete the deployments, replica sets, and pods between attempts, and I recreate the namespace, just to be safe. However, I've found that it doesn't make a difference which I do, as my code cleans up existing pods/replica sets/deployments as needed</li>
<li>that DNS is not an issue, as far as I can tell</li>
</ul>

<p>I have not:</p>

<ul>
<li>run kubernetes locally (as opposed to minikube), as the AUR package for kubernetes takes an unbelievably long time to build on my machine</li>
<li>read through the kubernetes source code, as I don't know golang</li>
</ul>

<p>When checking <code>minikube dashboard</code>, the sections for Deployments, Replica Sets, and Pods all have the same error:</p>

<pre><code>Failed to inspect image "registry_domain/XXX/YYY:latest": Id or size of image "registry_domain/XXX/YYY:latest" is not set
Error syncing pod, skipping: failed to "StartContainer" for "YYY" with ImageInspectError: "Failed to inspect image \"registry_domain/XXX/YYY:latest\": Id or size of image \"registry_domain/XXX/YYY:latest\" is not set"
</code></pre>

<p>and the pod logs are permanently stuck at</p>

<pre><code>container "YYY" in pod "YYY" is waiting to start: ImageInspectError
</code></pre>

<p>Looking up the error message provided leads me to <a href="https://github.com/kubernetes/minikube/issues/947" rel="nofollow noreferrer">https://github.com/kubernetes/minikube/issues/947</a>, but this is not the same issue, as <code>kube-dns</code> is working as expected. This is the only relevant search result, as the other results that come up are </p>

<ul>
<li>Slack chatroom archives that don't even contain the relevant error message</li>
<li>The kubernetes source, which isn't helpful to me</li>
<li>kubernetes/minikube #947, as above</li>
</ul>

<p>I'm honestly not sure where to go from here. Any advice would be appreciated. </p>

<p>Kubernetes 1.6 may not compatible with latest Docker version(17.xx.xx), could you lower down your Docker version and retry this.</p>

<p>The recommend version of Docker in Kubernetes(v1.6) is 1.12, if you not sure how to find that version. Use this in ubuntu or debain:</p>

<pre><code>apt-get update &amp;&amp; apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat &lt;&lt;EOF &gt;/etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update
apt-get install -y docker.io
</code></pre>

<p>For centos, <a href="https://kubernetes.io/docs/getting-started-guides/kubeadm/#instructions" rel="nofollow noreferrer">ref</a></p>

<p><strong>remove you current Docker install before trying this</strong></p>
