<p>I am having some trouble converting my docker setup to kubernetes. I have read the kubectl for docker users, have set up minikube and am trying to autoscale my docker application with kubernetes.
But I am having some trouble just running it.</p>

<p>I am trying to make a container with a python flask application on centos image that uses a database that I have setup in the cloud</p>

<p>In docker I would just use the docker build . -tag and then use docker run to setup my container. like so:</p>

<p><a href="https://i.stack.imgur.com/fnYHU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fnYHU.png" alt="enter image description here"></a></p>

<p>This would give me a container on port 5000 (For the Database I have to use the hostnetwork als it needs an ip to work with. setting localhost 127.0.0.1:5000 doesnt seem to work, but that is another issue in itself)</p>

<p>When I read the Kubectl documentation for docker users it would seem like i can do almost the same I do with docker in Kubernetes. So I am trying this.</p>

<p>I haven't figured out how to use --network host in kubernetes but I thought just running it and see if it gave an error. And it did. It seems not to be able to pull the image. but docker can. What is going wrong here?
<a href="https://i.stack.imgur.com/fEQ86.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fEQ86.png" alt="enter image description here"></a></p>

<p>after a while it just goes to.</p>

<p><a href="https://i.stack.imgur.com/nyG4s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nyG4s.png" alt="enter image description here"></a></p>

<p>I haven't even tried horizontal autoscaling yet, nor do I understand the docker-file convert yet. But i should be able to just run the container right?</p>

<p>EDIT:
I used windows to generate the screenshots. </p>

<p><strong>Commands I am running:</strong></p>

<p>docker run --network host -d hu-simple:latest</p>

<p><strong>output I am getting:</strong></p>

<p>a docker deamon string because it created a docker container for me</p>

<p><strong>Commands in Kubernetes I am trying:</strong></p>

<p>kubectl run --image=hu-simpel:latest hu-simpel --port=5000</p>

<p><strong>output i am getting:</strong></p>

<p>deployment.apps/hu-simpel created</p>

<p><strong>But when I try kubectl get all:</strong></p>

<p>I get: ErrImagepull and ImagePullBackOff after a while.</p>

<p>I don't think I am using a kubernetes deployment yaml as I am just trying to run a docker image on kubernetes. I didnt create it in kubernetes using a docker-compose but just tried to run the docker image. But do tell me if I am mistaken.</p>

Paralova
<p>This happens because your minikube instance is not able to reach your Docker daemon. In other words, your Kubernetes doesn't know anything about the images you built using your host Docker.</p>

<p>To solve this, you have this command: <code>minikube docker-env</code>. This will export everything from Docker to your minikube instance, meaning that you'll be able to reuse the images you build in your host.</p>

<p>When you finish you can do <code>docker-machine env -u</code>.</p>
