title: kubernetes local cluster create pods got errors like ‘ErrImagePull’ and ‘ImagePullBackOff’
body: <p>I just installed a kubernetes local cluster， but when I tried the command </p>
  
  <pre><code>cluster/kubectl.sh run my-nginx --image=nginx --replicas=2 --port=80
  </code></pre>
  
  <p>to create and run pods, here is what I got:</p>
  
  <pre><code>NAME             READY     STATUS              RESTARTS   AGE
  my-nginx-00t7f   0/1       ContainerCreating   0          23m
  my-nginx-spy2b   0/1       ContainerCreating   0          23m
  </code></pre>
  
  <p>and I used <code>kubectl logs</code>, I got </p>
  
  <pre><code>Pod "my-nginx-00t7f" in namespace "default" : pod is not in 'Running', 'Succeeded' or 'Failed' state - State: "Pending"
  </code></pre>
  
  <p>Seems it got stuck in 'pending' status.
  Then I used 'kubectl describe' and got</p>
  
  <pre><code>Name:                           my-nginx-00t7f
  Namespace:                      default
  Image(s):                       nginx
  Node:                           127.0.0.1/127.0.0.1
  Start Time:                     Thu, 17 Dec 2015 22:27:18 +0800
  Labels:                         run=my-nginx
  Status:                         Pending
  Reason:
  Message:
  IP:
  Replication Controllers:        my-nginx (2/2 replicas created)
  Containers:
    my-nginx:
      Container ID:
      Image:              nginx
      Image ID:
      QoS Tier:
        cpu:              BestEffort
        memory:           BestEffort
      State:              Waiting
        Reason:           ContainerCreating
      Ready:              False
      Restart Count:      0
      Environment Variables:
  Conditions:
    Type          Status
    Ready         False 
  Volumes:
    default-token-p09p6:
      Type:       Secret (a secret that should populate this volume)
      SecretName: default-token-p09p6
  Events:
    FirstSeen     LastSeen        Count   From                    SubobjectPath   Type            Reason          Message
    ---------     --------        -----   ----                    -------------   --------        ------          -------
    26m           26m             1       {scheduler }                            Normal          Scheduled       Successfully assigned my-nginx-00t7f to 127.0.0.1
    22m           1m              79      {kubelet 127.0.0.1}                     Warning         FailedSync      Error syncing pod, skipping: ImagePullBackOff
    24m           5s              8       {kubelet 127.0.0.1}                     Warning         FailedSync      Error syncing pod, skipping: ErrImagePull
  </code></pre>
  
  <p>It seems my docker can not pull images, but actually it can, there is no problem when I <code>docker pull nginx</code>.</p>