简体   繁体   English

始终以ContainerCreating状态创建Pod

[英]Pod creation in ContainerCreating state always

I am trying to create a pod using kubernetes with the following simple command kubectl run example --image=nginx 我正在尝试通过以下简单命令kubectl run example --image=nginx使用kubernetes创建一个pod

It runs and assigns the pod to the minion correctly but the status is always in ContainerCreating status due to the following error. 它运行并正确地将吊舱分配给小仆,但是由于以下错误,该状态始终处于ContainerCreating状态。 I have not hosted GCR or GCloud on my machine. 我没有在计算机上托管GCR或GCloud。 So not sure why its picking from there only. 所以不确定为什么只从那里采摘。

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 is trying to create a pause container for your pod; Kubernetes正在尝试为您的Pod创建一个pause容器。 this container is used to create the pod's network namespace. 该容器用于创建容器的网络名称空间。 See this question and its answers for more general information on the pause container. 有关pause容器的更多常规信息,请参见此问题及其答案

To your specific error: Kubernetes tries to pull the pause container's image (which would be gcr.io/google_containers/pause:2.0 , according to your error message) from the Google Container Registry (gcr.io). 您的特定错误:Kubernetes试图拉pause容器的图像(这将是gcr.io/google_containers/pause:2.0从谷歌容器注册(gcr.io),根据你的错误消息)。 Apparently, your Docker engine tries to connect to GCR using a HTTP proxy located at 87.254.212.120:8080 , to which it apparently cannot connect ( i/o timeout ). 显然,您的Docker引擎尝试使用位于87.254.212.120:8080的HTTP代理尝试连接到GCR,该代理显然无法连接到该代理( i/o timeout )。

To correct this error, either make sure that you HTTP proxy server is online and does not block HTTP requests to GCR, or (if you do have public Internet access) disable the proxy connection for your Docker engine (this would typically be done using the http_proxy and https_proxy environment variables, which would have been set in /etc/sysconfig/docker or /etc/default/docker , depending on your Linux distribution). 要更正此错误,请确保您的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