Not able to run e2e tests locally

2/2/2016

I have a local kueretes setup on Ubuntu. I am trying to execute e2e tests on this cluster. Here is the result I am getting:

root@kube-master:~/kube_latest/kubernetes# ./_output/local/go/bin/e2e.test --host="127.0.0.1:8080" --provider="local" --ginkgo.v=true --ginkgo.dryRun=true --kubecong="$HOME/.kubernetes_auth"
Feb  1 14:19:28.839: INFO: >>> testContext.KubeConfig: /root/.kubernetes_auth

Feb  1 14:19:28.839: INFO: >>> testContext.KubeConfig: /root/.kubernetes_auth

Feb  1 14:19:28.839: INFO: Waiting up to 10m0s for all pods (need at least 0) in namespace 'kube-system' to be running and ready
Feb  1 14:19:28.845: INFO: The status of Pod kube-dns-v8-m8drm is Pending, waiting for it to be either Running or Failed
Feb  1 14:19:28.845: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (0 seconds elapsed)
Feb  1 14:19:28.845: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb  1 14:19:28.845: INFO: POD                NODE             PHASE    GRACE  CONDITIONS
Feb  1 14:19:28.845: INFO: kube-dns-v8-m8drm  192.168.122.129  Pending         [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC  }]
Feb  1 14:19:28.845: INFO: 
Feb  1 14:19:30.854: INFO: The status of Pod kube-dns-v8-m8drm is Pending, waiting for it to be either Running or Failed
Feb  1 14:19:30.855: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (2 seconds elapsed)
Feb  1 14:19:30.856: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb  1 14:19:30.857: INFO: POD                NODE             PHASE    GRACE  CONDITIONS
Feb  1 14:19:30.857: INFO: kube-dns-v8-m8drm  192.168.122.129  Pending         [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC  }]
Feb  1 14:19:30.858: INFO: 
Feb  1 14:19:32.854: INFO: The status of Pod kube-dns-v8-m8drm is Pending, waiting for it to be either Running or Failed
Feb  1 14:19:32.854: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (4 seconds elapsed)
Feb  1 14:19:32.854: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb  1 14:19:32.854: INFO: POD                NODE             PHASE    GRACE  CONDITIONS
Feb  1 14:19:32.854: INFO: kube-dns-v8-m8drm  192.168.122.129  Pending         [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC  }]
Feb  1 14:19:32.854: INFO: 
Feb  1 14:19:34.851: INFO: The status of Pod kube-dns-v8-m8drm is Pending, waiting for it to be either Running or Failed
Feb  1 14:19:34.851: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (6 seconds elapsed)
Feb  1 14:19:34.851: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb  1 14:19:34.851: INFO: POD                NODE             PHASE    GRACE  CONDITIONS
Feb  1 14:19:34.851: INFO: kube-dns-v8-m8drm  192.168.122.129  Pending         [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC  }]
Feb  1 14:19:34.851: INFO: 
Feb  1 14:19:36.852: INFO: The status of Pod kube-dns-v8-m8drm is Pending, waiting for it to be either Running or Failed
Feb  1 14:19:36.852: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (8 seconds elapsed)
Feb  1 14:19:36.852: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb  1 14:19:36.852: INFO: POD                NODE             PHASE    GRACE  CONDITIONS
Feb  1 14:19:36.852: INFO: kube-dns-v8-m8drm  192.168.122.129  Pending         [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC  }]
Feb  1 14:19:36.852: INFO: 
Feb  1 14:19:38.851: INFO: The status of Pod kube-dns-v8-m8drm is Pending, waiting for it to be either Running or Failed
Feb  1 14:19:38.852: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (10 seconds elapsed)
Feb  1 14:19:38.852: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb  1 14:19:38.852: INFO: POD                NODE             PHASE    GRACE  CONDITIONS
Feb  1 14:19:38.852: INFO: kube-dns-v8-m8drm  192.168.122.129  Pending         [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC  }]

I am following this guide: http://kubernetes.io/v1.1/docs/devel/e2e-tests.html. I can't see the pod kube-dns-v8-m8drm in "kubectl get pods" either! Can you please help me figure out what exactly is the issue here? TIA.

Update:

Now, the pod has turned form pending to running, but still it's waiting:

root@kube-master:~/kube_latest/kubernetes/_output/local/bin/linux/amd64# ./e2e.test --host="127.0.0.1:8080" --provider="local" --ginkgo.v=true --ginkgo.dryRun=true --kubeconfig="$HOME/.kubernetes_auth"
Feb  4 13:16:46.663: INFO: >>> testContext.KubeConfig: /root/.kubernetes_auth

Feb  4 13:16:46.664: INFO: >>> testContext.KubeConfig: /root/.kubernetes_auth

Feb  4 13:16:46.664: INFO: Waiting up to 10m0s for all pods (need at least 0) in namespace 'kube-system' to be running and ready
Feb  4 13:16:46.672: INFO: The status of Pod kube-dns-v8-m8drm is Pending, waiting for it to be either Running or Failed
Feb  4 13:16:46.672: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (0 seconds elapsed)
Feb  4 13:16:46.672: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb  4 13:16:46.672: INFO: POD                NODE             PHASE    GRACE  CONDITIONS
Feb  4 13:16:46.672: INFO: kube-dns-v8-m8drm  192.168.122.129  Pending         []
Feb  4 13:16:46.672: INFO: 
Feb  4 13:16:48.679: INFO: The status of Pod kube-dns-v8-m8drm is Running, waiting for it to be either Running or Failed
Feb  4 13:16:48.679: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (2 seconds elapsed)
Feb  4 13:16:48.679: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb  4 13:16:48.679: INFO: POD                NODE             PHASE    GRACE  CONDITIONS
Feb  4 13:16:48.679: INFO: kube-dns-v8-m8drm  192.168.122.129  Running         [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC  }]
Feb  4 13:16:48.679: INFO: 
Feb  4 13:16:50.682: INFO: The status of Pod kube-dns-v8-m8drm is Running, waiting for it to be either Running or Failed
Feb  4 13:16:50.682: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (4 seconds elapsed)
Feb  4 13:16:50.682: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb  4 13:16:50.682: INFO: POD                NODE             PHASE    GRACE  CONDITIONS
Feb  4 13:16:50.682: INFO: kube-dns-v8-m8drm  192.168.122.129  Running         [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC  }]
Feb  4 13:16:50.682: INFO: 
Feb  4 13:16:52.682: INFO: The status of Pod kube-dns-v8-m8drm is Running, waiting for it to be either Running or Failed
Feb  4 13:16:52.682: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (6 seconds elapsed)
Feb  4 13:16:52.682: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb  4 13:16:52.682: INFO: POD                NODE             PHASE    GRACE  CONDITIONS
Feb  4 13:16:52.682: INFO: kube-dns-v8-m8drm  192.168.122.129  Running         [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC  }]
Feb  4 13:16:52.682: INFO: 
Feb  4 13:16:54.681: INFO: The status of Pod kube-dns-v8-m8drm is Running, waiting for it to be either Running or Failed
Feb  4 13:16:54.681: INFO: 0 / 1 pods in namespace 'kube-system' are running and ready (8 seconds elapsed)
Feb  4 13:16:54.681: INFO: expected 1 pod replicas in namespace 'kube-system', 0 are Running and Ready.
Feb  4 13:16:54.681: INFO: POD                NODE             PHASE    GRACE  CONDITIONS
Feb  4 13:16:54.681: INFO: kube-dns-v8-m8drm  192.168.122.129  Running         [{Ready False 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC  }]
Feb  4 13:16:54.681: INFO: 
-- Pensu
kubernetes

2 Answers

2/2/2016

"kubectl get pods" won't show the DNS pod because it's in the kube-system namespace rather than the default namespace.

Try "kubectl get pods --all-namespaces".

I assume you set up ~/.kubernetes_auth and ran hack/local-up-cluster.sh according to the instructions.

The general cluster troubleshooting tips can be found in the documentation: http://kubernetes.io/v1.1/docs/admin/cluster-troubleshooting.html

The pod could be Pending for a number of reasons: the scheduler isn't running, the node doesn't have sufficient resources for the pod to be scheduled, the image can't be pulled, ...

You may want to verify your local cluster is functional before trying e2e.

However, because the tests take a long time to run and some of the e2e tests at least used to require multiple nodes, I generally don't run e2e locally. I run them on a multi-node cluster, instead.

-- briangrant
Source: StackOverflow

1/25/2018

The log Ready False shows that the dns pod was not really running.
Was the READY status 3/3? Possibly the READY status was 2/3 and the RESTARTS was not 0 and increasing, which we've encountered many times. It will proceed as long as the dns pod is really running, like this :
NAME READY STATUS RESTARTS AGE IP NODE kube-dns-774d5484cc-8l4s4 3/3 Running 0 1m 172.17.0.3 127.0.0.1

-- wineinlib
Source: StackOverflow