<p>I have made a minimal image of a fast-api program by building its Dockerfile. The imagename is <code>task1</code>. I'm trying to deploy it locally with minikube, kubectl by specifying a file named <code>task1-deployment.yaml</code> with the following structure:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: task1-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: task1
  template:
    metadata:
      labels:
        app: task1
    spec:
      containers:
        - name: task1
          image: task1:latest
          imagePullPolicy: Never
          ports:
            - containerPort: 8080
</code></pre>
<p>Whenever I run <code>kubectl -f apply task1-deployment.yaml</code> it shows a successful message, yet when running <code>kubectl get deployment</code>, task1 isn't ready and can't be accessed at localhost:8080. <br>
The other official-pulled images work, what am I doing wrong?<br><br></p>
<p>Note: &quot;imagePullPolicy&quot; doesn't change anything</p>

X HOxha
<p>Posting this as an answer instead of a comment:</p>
<p>Minikube can't get images from your machine's docker - you need to load it into the minikube cluster by running  the following command:</p>
<pre><code>$ minikube image load &lt;image_name&gt;
</code></pre>
