<p>I have the following deployment and i use the image:flaskapp1:latest</p>
<pre><code>    apiVersion: apps/v1
kind: Deployment
metadata:
  name: flaskapp
  labels:
    app: flaskapp
spec:
  selector:
    matchLabels:
      app: flaskapp
  replicas: 1
  template:
    metadata:
      labels:
        app: flaskapp
    spec:
      containers:
      - name: flaskapp
        image: flaskapp1:latest
        imagePullPolicy: IfNotPresent
        ports:
          - containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
  name: flaskapp
spec:
  ports:
  - name: http
    port: 9090
    targetPort: 8080
  selector:
    app: flaskapp
</code></pre>
<p>Because the kubernetes cluster that i have created has only 2 nodes(master node and worker node) the pod is created in worker node where i have locally created the docker image.
More specific if i run</p>
<pre><code>sudo docker images
</code></pre>
<p>I have the follwing output:</p>
<pre><code>REPOSITORY    TAG       IMAGE ID       CREATED          SIZE
flaskapp1     latest    4004bc4ea926   34 minutes ago   932MB
</code></pre>
<p>For some reason when i apply the deployment above the status is ErrImagePull. Is there any wrong in my yaml file?</p>
<p>When i run <code>kubectl get pods -o wide</code> i have the following output:</p>
<pre><code>NAME                           READY   STATUS             RESTARTS   AGE     IP               NODE     NOMINATED NODE   READINESS GATES
flaskapp-55dbdfd6cf-952v8      0/1     ImagePullBackOff   0          7m44s   192.168.69.220   knode2   &lt;none&gt;           &lt;none&gt;
</code></pre>
<p>Also</p>

Rodr
<p>Glad, that it works now, but I would like to add some information for others, that might encounter this problem.</p>
<p>In general use a real registry to provide the images. This can be hosted using kubernetes as well, but it <em>must</em> be accessible from outside since the nodes will access it directly to retrieve images.
You should provide TLS secured access to the registry since container runtimes will not allow access to external hosts without a certificate or special configuration.</p>
<p>If you want to experiment with images and don't want to use a public registry or run your own you might be interested in an ephemeral registry: <a href="https://ttl.sh/" rel="nofollow noreferrer">https://ttl.sh/</a></p>
