<p>I have minikube running on Ubuntu 22.04.  When I update a docker image, push it to dockerhub, delete the previous deployment, and apply the deployment the result in the log is from code that is several hours old.</p>
<p>I see the service is gone after doing <code>kubectl delete -f deploy.yml</code> and exists after doing an <code>apply</code>, but the logs show output from old code.</p>
<p>When I do a <code>docker run ...</code> on the local docker image that was pushed to dockerhub the output shows the new code.  I've verified that <code>docker push ...</code> has uploaded the new code.</p>
<p>Is this a bug in minikube?  Here's my deployment script.</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: metadata
spec:
  replicas: 2
  selector:
    matchLabels:
      app: metadata
  template:
    metadata:
      labels:
        app: metadata
    spec:
      containers:
      - name: metadata
        image: dwschulze/metadata:1.0.0
        imagePullPolicy: IfNotPresent
        ports:
          - containerPort: 8081
---
apiVersion: v1
kind: Service
metadata:
  name: metadata
spec:
  type: NodePort
  ports:
  - name: http
    port: 80
    targetPort: 8081
  selector:
    app: metadata
</code></pre>

Dean Schulze
<p>in your deployment script have:</p>
<pre><code>imagePullPolicy: IfNotPresent
</code></pre>
<p>you need to change to:</p>
<pre><code>imagePullPolicy: Always
</code></pre>
<p>The &quot;Always&quot; value allows you to pull an image every time you deploy</p>
<p>I hope I helped :)</p>
