Skip to content

Instantly share code, notes, and snippets.

@vishnuhd
Created August 22, 2019 13:17
Show Gist options
  • Save vishnuhd/73c37cadf390d70a4aa38480430bf735 to your computer and use it in GitHub Desktop.
Save vishnuhd/73c37cadf390d70a4aa38480430bf735 to your computer and use it in GitHub Desktop.
Reference local images in Docker for Mac - Kubernetes

Reference local images in Docker for Mac - Kubernetes

To run a local baked docker image in docker for mac kubernetes set the imagePullPolicy to Never.

For example:

apiVersion: v1
kind: Pod
metadata:
  name: local-image-test
spec:
  containers:
  - name: local-image-container
    image: local-image:latest
    imagePullPolicy: Never

(Credits to kubernetes/kubernetes#1293 (comment) for this solution)

@diepes
Copy link

diepes commented Jul 26, 2022

Thanks i just started to think docker desktop k8s is not going to use local image on MAC since 1.24, but the imagePullPolicy: Never did the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment