首页 文章

启动pods-kubernetes时出错 . Pod仍处于ContainerCreating状态

提问于
浏览
2

我在运行ubuntu的桌面上安装了带有minikube的kubernetes试用版 . 然而,提出pods似乎存在一些问题 . Kubectl获取pods --all-namespaces显示ContainerCreating状态下的所有pod,并且它不会转换为Ready .

即使我做了kubernetes-dahboard,我也能得到

等待,服务 endpoints 尚未准备好 .

Minikube版本:v0.20.0

环境:

  • OS(例如来自/ 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年7月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 “,”name“:”kubernetes-dashboard-2039414953“,”uid“:”2eb39682-6849-11e7-8 ...状态:待定IP:创建者:ReplicaSet / kubernetes-dashboard-2039414953受控制:ReplicaSet / kubernetes -dashboard-2039414953容器:kubernetes-dashboard:容器ID:图像:gcr.io/google_containers/kubernetes-dashboard-amd64:v1.6.1图像ID:端口:9090 / TCP状态:等待原因:ContainerCreating Ready:False Restart Count: 0活动:http-get http://:9090 / delay = 30s timeout = 30s period = 10s#success = 1#failure = 3环境:从kubernetes-dashboard安装:/var/run/secrets/kubernetes.io/serviceaccount -token-12gdj(ro)条件:类型状态Initializ ed True Ready False PodScheduled True Volumes:kubernetes-dashboard-token-12gdj:Type:Secret(由Secret填充的卷)SecretName:kubernetes-dashboard-token-12gdj可选:false QoS类:BestEffort节点选择器:Tolerations:node -role.kubernetes.io/master:NoSchedule事件:FirstSeen LastSeen从SubObjectPath类型计数原因消息--------- -------- ----- ---- ---- --------- -------- ------ ------- 1h 11s 443 kubelet,minikube警告FailedSync错误同步pod,跳过:无法“CreatePodSandbox” “kubernetes-dashboard-2039414953-czptd_kube-system(2eb57d9b-6849-11e7-8a56-080027206461)”与CreatePodSandboxError:“CreatePodSandbox for pod \”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:由未知权限签署的证书“

3 回答

  • 0

    很可能正在下载Pod容器图像 . 图像不是很大,因此图像应该在一个体面的互联网连接上很快下载 .

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

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

    您也可以尝试_1279755使用 minikube ssh 进入minikube vm来调试问题 .

  • 2

    我能够通过使用VPN连接进行全新安装来解决此问题,因为我在公司网络中有限制 . 这阻止了安装尝试拉沙盒映像的站点 .

  • 0

    尝试使用:

    kubectl config use-context minikube
    

    ..可能已经启动了预先存在的配置 .

相关问题