<p>I have installed Kubernetes in Ubuntu server using instructions <a href="https://github.com/kubernetes/minikube/blob/master/README.md" rel="noreferrer">here</a>. I am trying to create pods using <code>kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --hostport=8000 --port=8080</code> as listed in the example. However, when I do <code>kubectl get pod</code> I get the status of the container as <code>pending</code>. I further did <code>kubectl describe pod</code> for debugging and I see the message:</p>

<p><code>FailedScheduling pod (hello-minikube-3383150820-1r4f7) failed to fit in any node fit failure on node (minikubevm): PodFitsHostPorts</code>.</p>

<p>I am further trying to delete this pod by <code>kubectl delete pod hello-minikube-3383150820-1r4f7</code>  but when I further do <code>kubectl get pod</code> I see another pod with prefix "hello-minikube-3383150820-" that I havent created. Does anyone know how to fix this problem? Thank you in advance.</p>

<p>The <code>PodFitsHostPorts</code> predicate is failing because you have something else on your nodes using port 8000. You might be able to find what it is by running <code>kubectl describe svc</code>.</p>

<p><code>kubectl run</code> creates a <code>deployment</code> object (you can see it with <code>kubectl describe deployments</code>) which makes sure that you always keep the intended number of replicas of the pod running (in this case 1). When you delete the pod, the deployment controller automatically creates another for you. If you want to delete the deployment and the pods it keeps creating, you can run <code>kubectl delete deployments hello-minikube</code>.</p>
