与 kubeadm 相关的 apt-get 更新错误
apt-get update error related with kubeadm
我遇到以下问题。
我使用 ubuntu 16.04。我正在关注指南文档,但它对我不起作用。
# cat /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
# curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
OK
# apt-get update
Hit:1 http://kr.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://kr.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
Get:5 https://packages.cloud.google.com/apt kubernetes-xenial InRelease
[8993 B]
Ign:5 https://packages.cloud.google.com/apt kubernetes-xenial InRelease
Fetched 8993 B in 1s (5258 B/s)
Reading package lists... Done
W: GPG error: https://packages.cloud.google.com/apt kubernetes-xenial
InRelease: The following signatures couldn't be verified because the public
key is not available: NO_PUBKEY 6A030B21BA07F4FB
W: The repository 'http://apt.kubernetes.io kubernetes-xenial InRelease' is
not signed.
N: Data from such a repository can't be authenticated and is therefore
potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration
details.
我想升级 kubeadm 版本。
如何解决这个问题?
您应该尝试从 Canonical 提供的密钥服务器更新 PGP 密钥:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6A030B21BA07F4FB
Executing: /tmp/apt-key-gpghome.F7OvCVWiqu/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6A030B21BA07F4FB
gpg: key 6A030B21BA07F4FB: public key "Google Cloud Packages Automatic Signing Key <gc-team@google.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
下一个:
sudo apt update && sudo apt upgrade
将完成剩下的工作。
如果问题仍然存在,也可以直接下载二进制文件:
wget https://storage.googleapis.com/kubernetes-release/release/v1.10.1/bin/linux/amd64/kubeadm
wget https://storage.googleapis.com/kubernetes-release/release/v1.10.1/bin/linux/amd64/kubectl
wget https://storage.googleapis.com/kubernetes-release/release/v1.10.1/bin/linux/amd64/kubelet
我遇到以下问题。
我使用 ubuntu 16.04。我正在关注指南文档,但它对我不起作用。
# cat /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
# curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
OK
# apt-get update
Hit:1 http://kr.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://kr.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
Get:5 https://packages.cloud.google.com/apt kubernetes-xenial InRelease
[8993 B]
Ign:5 https://packages.cloud.google.com/apt kubernetes-xenial InRelease
Fetched 8993 B in 1s (5258 B/s)
Reading package lists... Done
W: GPG error: https://packages.cloud.google.com/apt kubernetes-xenial
InRelease: The following signatures couldn't be verified because the public
key is not available: NO_PUBKEY 6A030B21BA07F4FB
W: The repository 'http://apt.kubernetes.io kubernetes-xenial InRelease' is
not signed.
N: Data from such a repository can't be authenticated and is therefore
potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration
details.
我想升级 kubeadm 版本。 如何解决这个问题?
您应该尝试从 Canonical 提供的密钥服务器更新 PGP 密钥:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6A030B21BA07F4FB
Executing: /tmp/apt-key-gpghome.F7OvCVWiqu/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6A030B21BA07F4FB
gpg: key 6A030B21BA07F4FB: public key "Google Cloud Packages Automatic Signing Key <gc-team@google.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
下一个:
sudo apt update && sudo apt upgrade
将完成剩下的工作。
如果问题仍然存在,也可以直接下载二进制文件:
wget https://storage.googleapis.com/kubernetes-release/release/v1.10.1/bin/linux/amd64/kubeadm
wget https://storage.googleapis.com/kubernetes-release/release/v1.10.1/bin/linux/amd64/kubectl
wget https://storage.googleapis.com/kubernetes-release/release/v1.10.1/bin/linux/amd64/kubelet