Kubernetes:Docker pod启动失败,除了一个

时间:2016-01-20 14:39:06

标签: docker kubernetes google-kubernetes-engine

我们正在Google容器引擎上运行Jetty服务。这个服务在带有rc的pod中运行得很好。我们可以关闭它,重建它并做各种各样的事情,它仍然可以工作。

现在,我们希望使用运行其他内容的debian映像扩展我们的基础架构。 在本地,docker工作正常,我们可以访问debian命令行。一旦我们尝试在云中运行pod,我们就会遇到问题。

我们使用的Dockerfile包含:FROM debian:latest 然后我们运行下一个命令:

docker build -t eu.gcr.io/project_id/debstable:stable .

gcloud docker push eu.gcr.io/project_id/debstable:stable

kubectl run debstable --image=eu.gcr.io/project_id/debstable:stable

pod接收CrashLoopBackOff状态并继续重启。 部分日志显示了这一点:

I0120 14:19:58.438979    3479 kubelet.go:2012] SyncLoop (ADD): "debstable-blvdi_default"
I0120 14:19:58.478235    3479 manager.go:1707] Need to restart pod infra container for "debstable-blvdi_default" because it is not found
I0120 14:20:00.025467    3479 server.go:944] GET /stats/default/debstable-blvdi/e2ab2ffc-bf80-11e5-a1d8-42010af001a5/debstable: (100.384µs) 404 [[Go 1.1 package http] 10.0.0.3:40650]
I0120 14:20:05.017006    3479 server.go:944] GET /stats/default/debstable-blvdi/e2ab2ffc-bf80-11e5-a1d8-42010af001a5/debstable: (56.159µs) 404 [[Go 1.1 package http] 10.0.0.3:40694]
I0120 14:20:10.015072    3479 server.go:944] GET /stats/default/debstable-blvdi/e2ab2ffc-bf80-11e5-a1d8-42010af001a5/debstable: (66.802µs) 404 [[Go 1.1 package http] 10.0.0.3:40708]
I0120 14:20:15.017521    3479 server.go:944] GET /stats/default/debstable-blvdi/e2ab2ffc-bf80-11e5-a1d8-42010af001a5/debstable: (32.91µs) 404 [[Go 1.1 package http] 10.0.0.3:40566]
I0120 14:20:18.530030    3479 manager.go:2022] Back-off 10s restarting failed container=debstable pod=debstable-blvdi_default

泊坞窗信息显示的版本可能相关:

$ sudo docker info
Containers: 24
Images: 68
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 116
 Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.16.0-0.bpo.4-amd64
Operating System: Debian GNU/Linux 7 (wheezy)
CPUs: 1
Total Memory: 3.625 GiB

WARNING: No swap limit support

谢谢,美好的一天

1 个答案:

答案 0 :(得分:2)

Prashanth B是对的!没有命令会导致pod在崩溃循环中重新启动。

谢谢,祝你好运。