启动pods-kubernetes时出错.豆荚保持在ContainerCreating状态 [英] Error in starting pods- kubernetes. Pods remain in ContainerCreating state

查看:127
本文介绍了启动pods-kubernetes时出错.豆荚保持在ContainerCreating状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在运行ubuntu的桌面上安装了带有minikube的kubernetes试用版.但是,提起豆荚似乎存在一些问题. Kubectl get pods --all-namespaces显示所有容器处于ContainerCreating状态,并且不会转移到Ready.

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.

即使我做kubernetes-dahboard,我也会得到

Even when i do a kubernetes-dahboard, i get

正在等待,服务端点尚未准备就绪.

Waiting, endpoint for service is not ready yet.

Minikube版本:v0.20.0

Minikube version : v0.20.0

环境:

  • OS(例如,从/etc/os-release中获取):Ubuntu 12.04.5 LTS

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

VM驱动程序"DriverName":"virtualbox"

VM Driver "DriverName": "virtualbox"

ISO版本"Boot2DockerURL": 文件:///home/nszig/.minikube/cache/iso/minikube-v0.20.0.iso"

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

我已经在Ubuntu上安装了minikube和kubectl.但是我无法通过CLI和GUI都访问仪表板.

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 给出以下错误

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

CLI上的minikube仪表板无法打开仪表板:输出

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版本: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"}

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日志还报告以下错误: .....

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 ....

名称:kubernetes-dashboard-2039414953-czptd命名空间:kube-system 节点:minikube/192.168.99.102开始时间:2017年7月14日星期五09:31:58 +0530标签:k8s-app = kubernetes-dashboard pod-template-hash = 2039414953 注释:kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","re​​ference":{"kind":"ReplicaSet","namespace":"kube-system, 名称":"kubernetes-dashboard-2039414953","uid":"2eb39682-6849-11e7-8 ... 状态:待定IP:已创建 提供者:ReplicaSet/kubernetes-dashboard-2039414953受控 作者:ReplicaSet/kubernetes-dashboard-2039414953容器:
kubernetes-仪表板: 容器编号: 图片:gcr.io/google_containers/kubernetes-dashboard-amd64:v1.6.1 图片编号:
端口:9090/TCP 状态:等待中 原因:容器创建 就绪:错误 重新启动计数:0 活动性:http-get http://:9090/ delay = 30s timeout = 30s period = 10s#success = 1#失败= 3 环境: 坐骑: 来自kubernetes-dashboard-token-12gdj(ro)的/var/run/secrets/kubernetes.io/serviceaccount(ro)条件:类型状态
已初始化的True Ready False Pod计划的真实卷:
kubernetes-dashboard-token-12gdj: 类型:机密(由机密填充的卷) SecretName:kubernetes-dashboard-token-12gdj 可选:false QoS类:BestEffort节点选择器:容忍度:node-role.kubernetes.io/master:NoSchedule事件:
SubObjectPath类型的原因消息中的FirstSeen LastSeen计数
--------- -------- ----- ---- ------------- --------- --- ------- 1h 11s 443 kubelet,minikube警告FailedSync错误同步 吊舱,正在跳过:未能针对"CreatePodSandbox" "kubernetes-dashboard-2039414953-czptd_kube-system(2eb57d9b-6849-11e7-8a56-080027206461)" 与CreatePodSandboxError:用于Pod的CreatePodSandbox \"kubernetes-dashboard-2039414953-czptd_kube-system(2eb57d9b-6849-11e7-8a56-080027206461)\" 失败:rpc错误:代码= 2 desc =无法提取沙箱图片 \"gcr.io/google_containers/pause-amd64:3.0 \":错误响应来自 守护程序:获取 https://gcr.io/v1/_ping :x509:证书签署人 权限不明"

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"

推荐答案

很有可能正在下载Pod容器图像.图像不是很大,因此应该在不错的Internet连接上很快下载图像.

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.

您可以使用kubectl describe pod --namespace kube-system <pod-name>来了解有关Pod调出状态的更多详细信息.看一下输出的Events部分.

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.

kube-system名称空间中的所有kubernetes组件都处于READY状态之前,您将无法访问仪表板.

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

您还可以尝试使用minikube ssh尝试SSH进入minikube vm,以调试问题.

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

这篇关于启动pods-kubernetes时出错.豆荚保持在ContainerCreating状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆