解决 Kubernetes 阿里云镜像源公钥问题

在使用阿里云镜像源安装 Kubernetes 时,您可能会遇到以下错误:

Err:2 https://mirrors.aliyun.com/kubernetes/apt kubernetes-xenial InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B53DC80D13EDEF05
Reading package lists... Done
W: GPG error: https://mirrors.aliyun.com/kubernetes/apt kubernetes-xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B53DC80D13EDEF05
E: The repository 'https://mirrors.aliyun.com/kubernetes/apt kubernetes-xenial InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

该错误提示是因为系统缺少公钥,需要手动添加该公钥。

解决方法:

  1. 导入公钥:

    执行以下命令导入公钥:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B53DC80D13EDEF05 ```

  1. 更新软件包列表:

    再次执行更新命令:

sudo apt-get update ```

执行完以上步骤后,您应该就能正常使用阿里云镜像源安装 Kubernetes 了。

解决 Err:2  Kubernetes 阿里云镜像源公钥问题

原文地址: https://www.cveoy.top/t/topic/oDSA 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录