1
votes

I have a picture below of my mac.

  • K8S Cluster(on VirtualBox, 1*master, 2*workers)
  • OS Ubuntu 15.04
  • K8S version 1.1.1

When I try to create a pod "busybox.yaml" it goes to pending status. How can I resolve it?

I pasted the online status below for understanding with a picture (kubectl describe node).

  • Status kubectl get nodes 192.168.56.11 kubernetes.io/hostname=192.168.56.11 Ready 7d 192.168.56.12 kubernetes.io/hostname=192.168.56.12 Ready 7d

  • kubectl get ev 1h 39s 217 busybox Pod FailedScheduling {scheduler } no nodes available to schedule pods

  • kubectl get pods NAME READY STATUS RESTARTS AGE busybox 0/1 Pending 0 1h

And I also added one more status. enter image description here

1

1 Answers

1
votes

"kubectl describe pod busybox" or "kubectl get pod busybox -o yaml" output could be useful.

Since you didn't specify, I assume that the busybox pod was created in the default namespace, and that no resource requirements nor nodeSelectors were specified.

In many cluster setups, including vagrant, we create a LimitRange for the default namespace to request a nominal amount of CPU for each pod (.1 cores). You should be able to confirm that this is the case using "kubectl get pod busybox -o yaml".

We also create a number of system pods automatically. You should be able to see them using "kubectl get pods --all-namespaces -o wide".

It is possible for nodes with sufficiently small capacity to fill up with just system pods, though I wouldn't expect this to happen with 2-core nodes.

If the busybox pod were created before the nodes were registered, that could be another reason for that event, though I would expect to see a subsequent event for the reason that the pod remained pending even after nodes were created.

Please take a look at the troubleshooting guide for more troubleshooting tips, and follow up here on on slack (slack.k8s.io) with more information.

http://kubernetes.io/v1.1/docs/troubleshooting.html