请教kubernetes部署问题,pod一直处于pending状态


使用命令 kubecfg -c apache-pod.json create pods 进行部署

json模板:
{
"id": "fedoraapache",
"kind": "Pod",
"apiVersion": "v1beta1",
"desiredState": {
"manifest": {
"version": "v1beta1",
"id": "fedoraapache",
"containers": [{
"name": "fedoraapache",
"image": "fedora/apache",
"ports": [{
"containerPort": 80,
"hostPort": 8080
}]
}]
}
},
"labels": {
"name": "fedoraapache"
}
}

镜像使用的是本地镜像fedora/apache(镜像从docker hub下载的,用docker run启动没)
zte@zte-F5SL:~/kubernetes/examples/guestbook$ sudo docker images
[sudo] password for zte:
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
fedora/apache latest 1eff270e703a 9 weeks ago 649.8 MB

但是
zte@zte-F5SL:~/kubernetes/examples/guestbook$ kubectl get pod
NAME IMAGE(S) HOST LABELS STATUS
fedoraapache fedora/apache 127.0.0.1/ name=fedoraapache Pending

用命令查看pod状态,没有发现异常
zte@zte-F5SL:~/kubernetes/examples/guestbook$ kubectl describe pods fedoraapache
Name: fedoraapache
Image(s): fedora/apache
Host: 127.0.0.1/
Labels: name=fedoraapache
Status: Pending
Replication Controllers: <none>
Events:
From SubobjectPath Status Reason Message
scheduler Pending scheduled Successfully assigned fedoraapache to 127.0.0.1

etcd是0.4.6版本,kubernetes是0.6.2版本,各组件启动正常,但是看到了下面的打印

Status:"Failure", Message:"unexpected end of JSON input"

怀疑是json模板不合法,但是没有找到原因。这个问题搞了几天了,没办法 只能求助各位.
已邀请:

King_NJ

赞同来自: anyegongjue282


有没有操作过pause镜像,如果是1.0.1 可以执行pause镜像,默认是到google处获取,
主要新增参数--pod-infra-container-image=docker3:5000/pause:latest指向你本地下载pause镜像即可

anyegongjue282

赞同来自:


谢谢,确实是你说的这个问题,已经解决了,很晚回复,抱歉。

jolestar

赞同来自:


主要是墙的原因。翻墙或者如 @King_NJ 所说改用私有仓库地址。

要回复问题请先登录注册