kubelet无法提取图像 - x509:由未知权限签署的证书

时间:2018-02-04 18:46:07

标签: kubernetes

我正在尝试在Windows 7上的VMware Workstation上运行的CentOS 7.3系统集群上安装Kubernetes 1.9.0,遵循" kubernetes-the-hard-way教程"。当我进入教程中的验证阶段并尝试启动busybox部署(https://github.com/kelseyhightower/kubernetes-the-hard-way/blob/master/docs/12-dns-addon.md)时,pod状态仍然停留在" ContainerCreating"。

pod应该运行的节点的kubelet日志显示以下错误消息:

failed to get sandbox image \"gcr.io/google_containers/pause:3.0\":
failed to pull image \"gcr.io/google_containers/pause:3.0\":
failed to pull image \"gcr.io/google_containers/pause:3.0\":
httpReaderSeeker: failed open: failed to do request:
Get https://storage.googleapis.com/artifacts.google-containers.appspot.com/containers/images/sha256:f112334343777b75be77ec1f835e3bbbe7d7bd46e27b6a2ae35c6b3cfea0987c: x509: certificate signed by unknown authority

我将这两个域添加到/etc/docker/daemon.json中的不安全注册表列表中:

{
  "insecure-registries" : ["gcr.io"],
  "insecure-registries" : ["googleapis.com"]
}

Docker能够从命令行中提取图像:

docker pull gcr.io/google_containers/pause:3.0
Trying to pull repository gcr.io/google_containers/pause ...
3.0: Pulling from gcr.io/google_containers/pause
a3ed95caeb02: Pull complete
f11233434377: Pull complete
Digest: sha256:0d093c962a6c2dd8bb8727b661e2b5f13e9df884af9945b4cc7088d9350cd3ee

任何想法为什么kubelet无法拉动图像?

谢谢, TI

1 个答案:

答案 0 :(得分:0)

daemon.json中的语法是

"insecure-registries" : ["gcr.io" , "googleapis.com"]

“同样取决于您访问的注册管理机构,您可能需要按照here

的说明执行”kubectl create secret docker-registry ...“操作

最后,您可能必须通过在docker中创建一个包含证明here

的证书的新目录,将证书定义为/etc/docker/certs.d