使用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 ...
随机推荐
- EntityFramework:值语义的实体如何修改?
背景 现在很流行值对象,值对象有如下特点:开发简单.使用简单和多线程安全.我试着让 EntityFramework 中的实体保持值语义,这样的话,对值语义实体的修改就应当等于“整体替换”,好像有点问题 ...
- 【GISER&&Painter】Chapter01:WebGL渲染初体验
基于上一篇OpenGL的渲染原理,这两周又陆续接触了一些关于WebGL绘图的一些内容,因为刚入门,很多东西又很晦涩,所以特意花了小半天的时间整理了一下,特此记录. 零 画一个多边形吧! 把一个多边形 ...
- WPF性能调试系列 – Ants Performance Profiler
WPF性能调试系列文章: WPF页面渲染优化:Application Timeline WPF页面业务加载优化:Ants Performance Profiler WPF内存优化:Ants Memor ...
- (转)SqlServer里DateTime转字符串
原文:http://www.cnblogs.com/kimbosung/p/4515670.html ), )::: ), ): :::953PM ), ): ), ): ), ): ), ): :: ...
- iOS开源项目:AudioPlayer
AudioPlayer是一个基于AVAudioStreamer的在线音乐播放软件. https://github.com/marshluca/AudioPlayer 首先将歌曲信息存储在NSArray ...
- iOS: FFmpeg的使用二
1.下载并编译FFMPEG. https://github.com/kewlbear/FFmpeg-iOS-build-script 下载后有一个build-ffmpeg.sh文件.终端执行即可自动下 ...
- 零基础学python-3.5 内存管理
* 变量无需事先声明 * 变量无需指定类型 * 程序猿不用关系内存管理 * 变量名会被回收 * del能够直接释放资源 1.python使用的是引用调用,而不是值调用,他使用的回收算法是引用计数算法, ...
- WordPress 禁用文章修订和自动保存的方法
以下代码亲测并没有效果,不能禁用自动保存 /* 移除自动保存和修订版本 */ remove_action('pre_post_update', 'wp_save_post_revision' ); ...
- (剑指Offer)面试题58:二叉树的下一个结点
题目: 给定一个二叉树和其中的一个结点,请找出中序遍历顺序的下一个结点并且返回.注意,树中的结点不仅包含左右子结点,同时包含指向父结点的指针. 思路: 考虑中序遍历的过程, 如果当前结点存在右子节点, ...
- 《iOS用户体验》总结与思考-改动版
假设转载此文.请注明出处:http://blog.csdn.net/paulery2012/article/details/25157347,谢谢. 前言: 本文是在阅读<ios用户体验> ...