无法将kubernetes-bionic主版本(Ubuntu 18.04)添加到apt存储库

时间:2018-10-30 16:00:00

标签: kubernetes apt ubuntu-18.04

我正在尝试在Ubuntu服务器/台式机版本18.04.1。上安装Kubernetes。 但是,当我想使用以下命令将kubernetes添加到apt存储库中时:

sudo apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-bionic main"

我收到以下错误:

Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease                                                                                               
Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                          
Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease                                                                                       
Hit:5 http://dl.google.com/linux/chrome/deb stable Release                                                                                            
Hit:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                                     
Hit:7 https://download.docker.com/linux/ubuntu bionic InRelease                                                                                       
Ign:8 https://packages.cloud.google.com/apt kubernetes-bionic InRelease                              
Err:10 https://packages.cloud.google.com/apt kubernetes-bionic Release
  404  Not Found [IP: 216.58.211.110 443]
Reading package lists... Done
E: The repository 'http://apt.kubernetes.io kubernetes-bionic Release' does not have a Release file.
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.

如果我随后尝试安装kubeadm,它将无法正常工作,因为我没有将存储库添加到apt

我希望有人可以阐明我的问题。

所有这些都在Hyper-V上的VM内运行

PS:我不是一个顽固的Linux专家,但来自Windows!

2 个答案:

答案 0 :(得分:2)

仿生文件夹仍未创建,但是我测试了添加带有' sudo apt-add-repository“ deb http://apt.kubernetes.io/ kubernetes-xenial main”和 sudo apt-add-repository“ deb http://apt.kubernetes.io/ kubernetes-yakkety main”

我能够在Ubuntu 18.04上使用代号* bionic ** ....来安装Kubeadm,Kubectl和kubelet。

请确保按照建议添加GPG密钥,并遵循良好做法,否则会产生漏洞,从而通过正确的程序包名称推送恶意代码...

curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt键添加

您可以自己检查dists-https://packages.cloud.google.com/apt/dists/

上存在的所有存储库

您还可以验证存储库是否已添加到/etc/apt/source.list或/etc/apt/source.list.d,如果存在,则应该没问题。...

答案 1 :(得分:1)

目前(2018年11月)尚无仿生文件夹。您可以在此处查看受支持的发行版:

https://packages.cloud.google.com/apt/dists

最新的kubernetes版本是:kubernetes-yakkety

这仍然适用于仿生。