Error in starting pods- kubernetes. Pods remain in ContainerCreating state

7/10/2017

I have installed kubernetes trial version with minikube on my desktop running ubuntu. However there seem to be some issue with bringing up the pods. Kubectl get pods --all-namespaces shows all the pods in ContainerCreating state and it doesn't shift to Ready.

Even when i do a kubernetes-dahboard, i get

Waiting, endpoint for service is not ready yet.

Minikube version : v0.20.0

Environment:

  • OS (e.g. from /etc/os-release): Ubuntu 12.04.5 LTS

    VM Driver "DriverName": "virtualbox"

    ISO version "Boot2DockerURL": "file:///home/nszig/.minikube/cache/iso/minikube-v0.20.0.iso"

I have installed minikube and kubectl on Ubuntu. However i cannot access the dashboard both through the CLI and through the GUI.

http://127.0.0.1:8001/ui give the below error

{ "kind": "Status", "apiVersion": "v1", "metadata": {}, "status": "Failure", "message": "no endpoints available for service "kubernetes-dashboard"", "reason": "ServiceUnavailable", "code": 503 }

And minikube dashboard on the CLI does not open the dashboard: Output

Waiting, endpoint for service is not ready yet...
Waiting, endpoint for service is not ready yet... 
Waiting, endpoint for service is not ready yet... 
Waiting, endpoint for service is not ready yet...
....... 
Could not find finalized endpoint being pointed to by kubernetes-dashboard: Temporary Error: Endpoint for service is not ready yet 
Temporary Error: Endpoint for service is not ready yet 
Temporary Error: Endpoint for service is not ready yet 
Temporary Error: Endpoint for service is not ready yet

kubectl version: Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.0", GitCommit:"d3ada0119e776222f11ec7945e6d860061339aad", GitTreeState:"clean", BuildDate:"2017-06-29T23:15:59Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.4", GitCommit:"d6f433224538d4f9ca2f7ae19b252e6fcb66a3ae", GitTreeState:"dirty", BuildDate:"2017-06-22T04:31:09Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}

minikube logs also reports the errors below: .....

Jul 10 08:46:12 minikube localkube[3237]: I0710 08:46:12.901880 3237 kuberuntime_manager.go:458] Container {Name:php-redis Image:gcr.io/google-samples/gb-frontend:v4 Command:[] Args:[] WorkingDir: Ports:[{Name: HostPort:0 ContainerPort:80 Protocol:TCP HostIP:}] EnvFrom:[] Env:[{Name:GET_HOSTS_FROM Value:dns ValueFrom:nil}] Resources:{Limits:map[] Requests:map[cpu:{i:{value:100 scale:-3} d:{Dec:} s:100m Format:DecimalSI} memory:{i:{value:104857600 scale:0} d:{Dec:} s:100Mi Format:BinarySI}]} VolumeMounts:[{Name:default-token-gqtvf ReadOnly:true MountPath:/var/run/secrets/kubernetes.io/serviceaccount SubPath:}] LivenessProbe:nil ReadinessProbe:nil Lifecycle:nil TerminationMessagePath:/dev/termination-log TerminationMessagePolicy:File ImagePullPolicy:IfNotPresent SecurityContext:nil Stdin:false StdinOnce:false TTY:false} is dead, but RestartPolicy says that we should restart it. Jul 10 08:46:14 minikube localkube[3237]: E0710 08:46:14.139555 3237 remote_runtime.go:86] RunPodSandbox from runtime service failed: rpc error: code = 2 desc = unable to pull sandbox image "gcr.io/google_containers/pause-amd64:3.0": Error response from daemon: Get https://gcr.io/v1/_ping: x509: certificate signed by unknown authority ....

Name: kubernetes-dashboard-2039414953-czptd Namespace: kube-system Node: minikube/192.168.99.102 Start Time: Fri, 14 Jul 2017 09:31:58 +0530 Labels: k8s-app=kubernetes-dashboard pod-template-hash=2039414953 Annotations: kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"kube-system","name":"kubernetes-dashboard-2039414953","uid":"2eb39682-6849-11e7-8... Status: Pending IP: Created By: ReplicaSet/kubernetes-dashboard-2039414953 Controlled By: ReplicaSet/kubernetes-dashboard-2039414953 Containers:
kubernetes-dashboard: Container ID: Image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.6.1 Image ID:
Port: 9090/TCP State: Waiting Reason: ContainerCreating Ready: False Restart Count: 0 Liveness: http-get http://:9090/ delay=30s timeout=30s period=10s #success=1 #failure=3 Environment: Mounts: /var/run/secrets/kubernetes.io/serviceaccount from kubernetes-dashboard-token-12gdj (ro) Conditions: Type Status
Initialized True Ready False PodScheduled True Volumes:
kubernetes-dashboard-token-12gdj: Type: Secret (a volume populated by a Secret) SecretName: kubernetes-dashboard-token-12gdj Optional: false QoS Class: BestEffort Node-Selectors: Tolerations: node-role.kubernetes.io/master:NoSchedule Events:
FirstSeen LastSeen Count From SubObjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ ------- 1h 11s 443 kubelet, minikube Warning FailedSync Error syncing pod, skipping: failed to "CreatePodSandbox" for "kubernetes-dashboard-2039414953-czptd_kube-system(2eb57d9b-6849-11e7-8a56-080027206461)" with CreatePodSandboxError: "CreatePodSandbox for pod \"kubernetes-dashboard-2039414953-czptd_kube-system(2eb57d9b-6849-11e7-8a56-080027206461)\" failed: rpc error: code = 2 desc = unable to pull sandbox image \"gcr.io/google_containers/pause-amd64:3.0\": Error response from daemon: Get https://gcr.io/v1/_ping: x509: certificate signed by unknown authority"

-- NSP
kubernetes

3 Answers

7/25/2017

I was able to resolve this issue by doing a clean install using a VPN connection as i had restrictions in my corporate network. This was blocking the site from where the install was trying to pull the sandbox image.

-- NSP
Source: StackOverflow

11/24/2017

Try using:

kubectl config use-context minikube

..as a preexisting configuration may have be initiated.

-- Jason Mullings
Source: StackOverflow

7/14/2017

It's quite possible that the Pod container images are being downloaded. The images are not very large so the images should get downloaded pretty quickly on a decent internet connection.

You can use kubectl describe pod --namespace kube-system <pod-name> to know more details on the pod bring up status. Take a look at the Events section of the output.

Until all the kubernetes components in the kube-system namespace are in READY state, you will not be able to access the dashboard.

You can also try SSH'ing into the minikube vm with minikube ssh to debug the issue.

-- Sameer Naik
Source: StackOverflow