Docker 谷歌容器注册有问题吗?
在使用容器优化的虚拟机时,我面临一个问题。我使用以下命令启动一个实例:Docker 谷歌容器注册有问题吗?,docker,google-cloud-platform,google-kubernetes-engine,google-container-registry,Docker,Google Cloud Platform,Google Kubernetes Engine,Google Container Registry,在使用容器优化的虚拟机时,我面临一个问题。我使用以下命令启动一个实例: gcloud compute instances create "$instance_name" \ --tags "http-server" \ --image container-vm \ --scopes storage-rw,logging-write \ --metadata-from-file google-container-manifest="m2.yml" \ --z
gcloud compute instances create "$instance_name" \
--tags "http-server" \
--image container-vm \
--scopes storage-rw,logging-write \
--metadata-from-file google-container-manifest="m2.yml" \
--zone "$my_zone" \
--machine-type "$my_machine_type"
其中m2.yml
为:
version: v1beta2
containers:
- name: nginx
image: nginx
当我ssh到实例并查看/var/log/docker.log
时,我看到:
time="2015-06-17T07:42:59Z" level=error msg="Handler for GET /containers/{name:.*}/json returned error: no such id: kubelet"
time="2015-06-17T07:42:59Z" level=error msg="HTTP Error: statusCode=404 no such id: kubelet"
time="2015-06-17T07:42:59Z" level=info msg="GET /version"
time="2015-06-17T07:42:59Z" level=info msg="+job version()"
time="2015-06-17T07:42:59Z" level=info msg="-job version() = OK (0)"
time="2015-06-17T07:42:59Z" level=info msg="GET /containers/docker-daemon/json"
time="2015-06-17T07:42:59Z" level=info msg="+job container_inspect(docker-daemon)"
no such id: docker-daemon
time="2015-06-17T07:42:59Z" level=info msg="-job container_inspect(docker-daemon) = ERR (1)"
time="2015-06-17T07:42:59Z" level=error msg="Handler for GET /containers/{name:.*}/json returned error: no such id: docker-daemon"
time="2015-06-17T07:42:59Z" level=error msg="HTTP Error: statusCode=404 no such id: docker-daemon"
实例上没有运行任何容器,docker映像-a
表示:
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
gcr.io/google_containers/pause 0.8.0 2c40b0526b63 11 weeks ago 241.7 kB
<none> <none> 56ba5533a2db 11 weeks ago 241.7 kB
<none> <none> 511136ea3c5a 2.009460 years ago 0 B
我正要通过反馈表单发送反馈,但提交失败,原因是:relay\uu en.js?authuser=1:182未捕获类型错误:无法设置未定义的属性“vmFeedbackData”
。这样的故事
最新的容器vm映像不支持v1beta2 kubernetes API。您需要更新清单以使用v1beta3或v1(以及相应的yaml更改)
的最新版本显示了一个使用v1api的yaml示例 我遇到了一个类似的问题,结果证明解决方案是我正在尝试使用的
securityContext:
privileged: true
Kubernetes在不使用Google容器集群的情况下将docker映像加载到GCE实例(即在compute.v1.instance
或compute.v1.instanceTemplate
上使用Google容器清单
元数据项)时不尊重该属性,因此它永远不会将映像正确加载到实例上
删除该属性解决了我的问题。如果它解决了你的问题,你能接受答案吗?谢谢
securityContext:
privileged: true