【发布时间】:2017-12-13 17:39:26
【问题描述】:
我已经在运行 ubuntu 的桌面上安装了带有 minikube 的 kubernetes 试用版。但是,提出 pod 似乎存在一些问题。 Kubectl get pods --all-namespaces 显示所有处于 ContainerCreating 状态的 pod,它不会切换到 Ready。
即使我做一个 kubernetes-dahboard,我也会得到
等待,服务端点尚未准备好。
Minikube 版本:v0.20.0
环境:
-
操作系统(例如来自 /etc/os-release):Ubuntu 12.04.5 LTS
VM 驱动程序“DriverName”:“virtualbox”
ISO 版本“Boot2DockerURL”: "file:///home/nszig/.minikube/cache/iso/minikube-v0.20.0.iso"
我已经在 Ubuntu 上安装了 minikube 和 kubectl。但是,我无法通过 CLI 和 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 仪表板没有打开仪表板:输出
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"}
minikube 日志还报告以下错误: .....
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-07-14 09:31:58 +0530 标签:k8s-app=kubernetes-dashboard pod-template-hash=2039414953 注解:kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"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 状态:等待 原因:ContainerCreating 准备好:错误 重启次数:0 活跃度:http-get http://:9090/delay=30s timeout=30s period=10s #success=1 #failure=3 环境: 坐骑: /var/run/secrets/kubernetes.io/serviceaccount 来自 kubernetes-dashboard-token-12gdj (ro) 条件:类型状态
已初始化 True Ready False PodScheduled True Volumes:
kubernetes-dashboard-token-12gdj: 类型:Secret(由 Secret 填充的卷) SecretName:kubernetes-dashboard-token-12gdj 可选:false QoS 类:BestEffort 节点选择器:容忍度:node-role.kubernetes.io/master:NoSchedule 事件:
来自 SubObjectPath 类型原因消息的 FirstSeen LastSeen 计数
--------- -------- ----- ---- ------------- -------- --- --- ------- 1h 11s 443 kubelet, minikube 警告 FailedSync 同步错误 吊舱,跳过:未能“创建PodSandbox” “kubernetes-dashboard-2039414953-czptd_kube-system(2eb57d9b-6849-11e7-8a56-080027206461)” 使用 CreatePodSandboxError:“为 pod 创建 PodSandbox \"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:证书签名者 未知权威”
【问题讨论】:
-
这些信息不足以帮助您。例如,我们不知道您使用的是哪个驱动程序。我的预感是您没有分配足够的资源,例如,尝试使用
--memory参数为其分配更多 RAM。初学者请查看kubernetes.io/docs/getting-started-guides/minikube。 -
@MichaelHausenblas 感谢您的链接。我已经编辑了我的问题以包含更多信息
-
@MichaelHausenblas 我无法在 vm 中安装任何软件包(LINUX 版本 4.9.13,gcc 版本 5.4.0(Buildroot 2017.02))。知道你是怎么做的吗?
-
对不起,我对 Minikube 不是很熟悉,我只是在使用 Minishift……
标签: kubernetes