繁体   English   中英

始终以ContainerCreating状态创建Pod

[英]Pod creation in ContainerCreating state always

我正在尝试通过以下简单命令kubectl run example --image=nginx使用kubernetes创建一个pod

它运行并正确地将吊舱分配给小仆,但是由于以下错误,该状态始终处于ContainerCreating状态。 我没有在计算机上托管GCR或GCloud。 所以不确定为什么只从那里采摘。

1h 29m 14s {kubelet centos-minion1} Warning FailedSync Error syncing pod, skipping: 
failed to "StartContainer" for "POD" with ErrImagePull: "image pull failed
for gcr.io/google_containers/pause:2.0, this may be because there are no
credentials on this request.  details: (unable to ping registry endpoint
https://gcr.io/v0/\nv2 ping attempt failed with error: Get https://gcr.io/v2/:
http: error connecting to proxy http://87.254.212.120:8080: dial tcp
87.254.212.120:8080: i/o timeout\n v1 ping attempt failed with error:
Get https://gcr.io/v1/_ping: http: error connecting to proxy
http://87.254.212.120:8080: dial tcp 87.254.212.120:8080: i/o timeout)

Kubernetes正在尝试为您的Pod创建一个pause容器。 该容器用于创建容器的网络名称空间。 有关pause容器的更多常规信息,请参见此问题及其答案

您的特定错误:Kubernetes试图拉pause容器的图像(这将是gcr.io/google_containers/pause:2.0从谷歌容器注册(gcr.io),根据你的错误消息)。 显然,您的Docker引擎尝试使用位于87.254.212.120:8080的HTTP代理尝试连接到GCR,该代理显然无法连接到该代理( i/o timeout )。

要更正此错误,请确保您的HTTP代理服务器在线并且不阻止对GCR的HTTP请求,或者(如果您具有公共Internet访问权限)禁用Docker引擎的代理连接(通常使用http_proxyhttps_proxy环境变量,这些变量将在/etc/sysconfig/docker/etc/default/docker ,具体取决于您的Linux发行版)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM