<p>Is possible to set a local image in a kubernetes pod yml file?</p>

<p>This is my pod yml file, and the question is if I can use a local image to containers tag (in local, I have all files to my api project, dockerfile, etc).</p>

<pre><code>apiVersion: apps/v1
kind: ReplicaSet
metadata:
  name: api-service
spec:
  selector:
    matchLabels:
      api-name: api-service
  replicas: 2
  template: 
    metadata:
      labels:
        api-name: api-service
    spec:
      containers:
        - name: api-service
          image: #HERE
</code></pre>

TitaoYamamoto
<p>By local you mean it doesn't pull from dockerhub or any of the public registry.  Yes it's possible if you run a single node kubernetes. You will utlize the docker cache where your kubernetes/kubelet is running.</p>

<p>First thing is, you need to set your imagePullPolicy: IfNotPresent.  Then, when you build your image, you need to point to the docker instance your kubernetes is using.</p>

<p>I do this mostly with minikube, so the dev iteration is faster without pushing to my registry.</p>
