使用kubernetes创建容器一直处于ContainerCreating状态的原因查找与解决
运行容器的时候,发现一直处于ContainerCreating状态,悲了个催,刚入手就遇到了点麻烦,下面来讲讲如何查找问题及解决的
运行容器命令:
[root@master- ~]# kubectl run my-alpine --image=alpine --replicas= ping www.baidu.com
查看pods状态
[root@master- ~]# kubectl get pods
NAME READY STATUS RESTARTS AGE
my-alpine--knzcx / ContainerCreating 6m
my-alpine--lmvv5 / ContainerCreating 6m
一直处于ContainerCreating状态,开始查找原因
执行如下命令:
[root@master- ~]# kubectl describe pod my-alpine
Name: my-alpine--knzcx
Namespace: default
Node: node-/192.168.10.150
Start Time: Sat, Nov :: +
Labels: pod-template-hash=,run=my-alpine
Status: Pending
IP:
Controllers: ReplicaSet/my-alpine-
Containers:
my-alpine:
Container ID:
Image: alpine
Image ID:
Port:
Args:
ping
www.baidu.com
QoS Tier:
cpu: BestEffort
memory: BestEffort
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count:
Environment Variables:
Conditions:
Type Status
Ready False
No volumes.
Events:
FirstSeen LastSeen Count From SubobjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
7m 7m {default-scheduler } Normal Scheduled Successfully assigned my-alpine--knzcx to node-
6m 6m {kubelet node-} 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/: dial tcp 64.233.189.82:443: getsockopt: connection refused\n v1 ping attempt failed with error: Get https://gcr.io/v1/_ping: dial tcp 64.233.189.82:443: getsockopt: connection refused)" 4m 47s {kubelet node-} 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/: dial tcp 74.125.204.82:443: getsockopt: connection refused\n v1 ping attempt failed with error: Get https://gcr.io/v1/_ping: dial tcp 74.125.204.82:443: getsockopt: connection refused)" 4m 8s {kubelet node-} Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "POD" with ImagePullBackOff: "Back-off pulling image \"gcr.io/google_containers/pause:2.0\"" Name: my-alpine--lmvv5
Namespace: default
Node: node-/192.168.10.150
Start Time: Sat, Nov :: +
Labels: pod-template-hash=,run=my-alpine
Status: Pending
IP:
Controllers: ReplicaSet/my-alpine-
Containers:
my-alpine:
Container ID:
Image: alpine
Image ID:
Port:
Args:
ping
www.baidu.com
QoS Tier:
cpu: BestEffort
memory: BestEffort
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count:
Environment Variables:
Conditions:
Type Status
Ready False
No volumes.
Events:
FirstSeen LastSeen Count From SubobjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
7m 7m {default-scheduler } Normal Scheduled Successfully assigned my-alpine--lmvv5 to node-
5m 1m {kubelet node-} 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/: dial tcp 74.125.204.82:443: getsockopt: connection refused\n v1 ping attempt failed with error: Get https://gcr.io/v1/_ping: dial tcp 74.125.204.82:443: getsockopt: connection refused)" 3m 1m {kubelet node-} Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "POD" with ImagePullBackOff: "Back-off pulling image \"gcr.io/google_containers/pause:2.0\""
其中: 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/: dial tcp 74.125.204.82:443: getsockopt: connection refused\n v1 ping attempt failed with error: Get https://gcr.io/v1/_ping: dial tcp 74.125.204.82:443: getsockopt: connection refused)
不难看出,无法访问到gcr.io
有如下解决办法:
- 翻墙
- 修改hosts文件(这里我用的是“61.91.161.217
gcr.io”,但是可能会失效) - 从其他源下载容器“pause:2.0”,然后打tag为“gcr.io/google_containers/pause:2.0”
使用kubernetes创建容器一直处于ContainerCreating状态的原因查找与解决的更多相关文章
- kubernetes创建yaml,pod服务一直处于 ContainerCreating状态的原因查找与解决
最近刚刚入手研究kubernetes,运行容器的时候,发现一直处于ContainerCreating状态,悲了个催,刚入手就遇到了点麻烦,下面来讲讲如何查找问题及解决的 运行容器命令: kubectl ...
- 使用k8s创建容器一直处于ContainerCreating状态
容器报错信息为(两种): FailedSynError syncing pod, skipping: failed to {kubelet 127.0.0.1} Warning FailedSync ...
- CentOS 7 yum安装 k8s 创建Pod一直处于ContainerCreating状态 问题解决
问题描述 使用CentOS7的 yum 包管理器安装了 Kubernetes 集群,使用 kubectl 创建服务成功后,执行 kubectl get pods,发现AGE虽然在不断增加,但状态始终不 ...
- 解决k8s出现pod服务一直处于ContainerCreating状态的问题的过程
参考于: https://blog.csdn.net/learner198461/article/details/78036854 https://liyang.pro/solve-k8s-pod-c ...
- kubernetes删除pod一直处于terminating状态的解决方法
kubernetes删除pod一直处理 Terminating状态 # kubectl get po -n mon NAME READY STATUS RESTARTS AGE alertmanage ...
- 点击ViewGroup时其子控件也变成pressed状态的原因分析及解决办法
这个问题,当初在分析touch事件处理的时候按理应该分析到的,可是由于我当时觉得这块代码和touch的主题不是那么紧密, 就这么忽略掉了,直到后来在这上面遇到了问题.其实这个现象做Android开发的 ...
- Docker 创建容器 查看容器状态 - 三
Docker 创建容器 1.拉取镜像 默认是 docker.io 仓最新镜像 docker pull tomcat 2.运行一个服务容器 docker run -d -p 0.0.0.0:18080: ...
- Kubernetes创建挂载共享存储的容器
原文链接:https://www.58jb.com/html/135.html 在上一次的Mysql容器中,已经使用过了配置宿主机目录挂载的方式,这样虽然方便但是不够安全:一般都是把数据存储在远程服务 ...
- kubernetes删除pod,pod一直处于Terminating状态
删除pod,pod一直处于Terminating状态 [root@yxz-cluster01 deploy_yaml]# kubectl get pod -n yunanbao NAME READY ...
随机推荐
- TSL / SSL
参考: http://www.ruanyifeng.com/blog/2014/09/illustration-ssl.html http://www.tuicool.com/articles/IJ3 ...
- 【微信小程序】view顶部固定或底部固定 + scroll-view中的元素view也可以使用position:fixed;固定选中元素位置
1.顶端固定核心代码如下: <view class="page__hd" style="position:fixed; top:0;width: 750rpx;&q ...
- MyEclipse for Linux版下载
最近看到很多网友都在找MyEclipse for Linux版下载,费了很大劲也没有找到.1.建议通过代理到官方网站下载. 2.用迅雷下载.设置迅雷使用代理下载(我用的就是这种方式). MyEclip ...
- 谈谈我用Unity5的AssetBundle踩到的几个坑
在上段时间摸索了Unity5的assetbundle用法之后,我在项目里面全面的使用起来,于是发现了一些坑,这里和大家分享一下,顺便说说我是怎样解决的. 首先是图集打包的问题.这个问题在unity5. ...
- [翻译] Canvas 不用写代码的动画
Canvas 不用写代码的动画 https://github.com/CanvasPod/Canvas Canvas is a project to simplify iOS development ...
- 解决sqoop报错:SQLServerException: 将字符串转换为 uniqueidentifier 时失败。
报错栈: Error: java.io.IOException: Cannection handler cannot recover failure: at org.apache.sqoop.mapr ...
- [Android Studio] Android Studio中查看类的继承关系
转载自:http://blog.csdn.net/hyr83960944/article/details/38098091 查看类的继承关系的快捷键F4,在Android Studio常用快捷键这篇文 ...
- MANIFEST.MF文件Class-Path:节点需要引入的jar太多解决方案
每行开头结尾都要有一个空格(半角的) 例子如下: Manifest-Version: 1.0 Class-Path: lib/mongo-java-driver-2.11.4.jar lib/guav ...
- HTML:图片和视频标签的使用
介绍:在html网页中,图片和视频是基本的元素,在网页中插入图片和视频有自己的标签,分别是img.embed,来源都是使用src来链接. 插入图片: <img src="图片的来源&q ...
- Delphi DBGrid图显用法
procedure TForm10.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;DataCol: Integer; Column: ...