【问题标题】:Unable to install kubeadm due to SSL certificate problem when trying to download the Google public key尝试下载 Google 公钥时,由于 SSL 证书问题而无法安装 kubeadm
【发布时间】:2021-06-29 08:58:32
【问题描述】:

我正在按照官方 kubernetes 文档在我的集群 https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/ 上安装 kubeadm,但是当我尝试下载 Google Cloud 公共签名密钥时出现以下错误:

我正在运行“Ubuntu 20.04.2 LTS”

$ sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg

curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

你能建议吗?谢谢

【问题讨论】:

  • 听起来您正在使用一个拦截代理,并且未能将其 MITM CA 添加到主机的受信任存储中——如果这是真的,下载 gpg 密钥将是最少的您将遇到的问题。您还需要在 ServerFault.com 上询问系统管理问题,因为这不是编程问题

标签: kubernetes kubeadm


【解决方案1】:

出于测试目的,我只是采用了新鲜的Ubuntu 20.04.2 LTS 并复制了前几个步骤。结论 - curl 命令一切正常,我只是能够成功下载它。

您没有任何代理配置吗?

sudo apt-get install -y apt-transport-https ca-certificates curl
sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubeadm

sudo kubeadm version
kubeadm version: &version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.5", GitCommit:"6b1d87acf3c8253c123756b9e61dac642678305f", GitTreeState:"clean", BuildDate:"2021-03-18T01:08:27Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}

【讨论】:

  • 不,我没有任何代理配置。
  • 你们是对的人,在我的机器上找到了一个由我们的系统管理员管理的代理配置工具。我确实禁用了它一会儿,然后命令运行没有问题,之后立即重新启用了该工具。谢谢
猜你喜欢
  • 2018-01-08
  • 2017-05-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-09-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多