title: Creating a pod (using YAML file ) from a Docker image in a local registry
body: <p>I want to deploy a pod via YAML from docker image that is successfully pushed to the local registry. Please note that it is a local registry and I am not interested in using any Private registry.</p>
  <p>My dev envrionment is  - Minikube/K8S, Docker, Ubuntu</p>
  <p>Yaml file  snippet:</p>
  <pre><code>apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: apirestapp-deployment
    labels:
      app: apirestapp
  spec:
    replicas: 1
    selector:
      matchLabels:
        app: apirestapp
    template:
      metadata:
        labels:
          app: apirestapp
      spec:
        containers:
          - name: test-api-rest
            image: 192.168.xx.yy:5000/test-api-rest:1.0
            imagePullPolicy: Always
  </code></pre>
  <p>In short, my procedure is:</p>
  <ol>
  <li>created local docker repository – done</li>
  <li>created the Dockerfile for my app - done</li>
  <li>created the image from Dockerfile - done</li>
  <li>push the image to local registry - done</li>
  <li>I face an error when I execute the kubectl command:</li>
  </ol>
  <pre><code>$ kubectl apply -f test-api-rest-all.yaml
  </code></pre>
  <p>I am getting ImagePullBackOff error:</p>
  <pre><code>Failed to pull image &quot;192.168.xx.yy:5000/test-api-rest:1.0&quot;: rpc error: code = Unknown desc = Error response from daemon: Get &quot;https://192.168.xx.yy:5000/v2/&quot;: http: server gave HTTP response to HTTPS client
  </code></pre>
  <p>It is also important to share that I have also tried achieving my objective by creating the image in Minikube Registry, there also I face the same error.</p>
  <p>I understand it is related to 'insecure-registry' entry, so I have already tried with an insecure-registry thing in /etc/docker/daemon.json.</p>