Unable to add kubernetes-bionic main (Ubuntu 18.04) to apt repository

10,268

Solution 1

At the moment (nov. 2018) there is no bionic folder. You can see the supported distributions here:

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

The last kubernetes version there is: kubernetes-yakkety

This should still work with bionic.

Solution 2

Bionic folder is still not yet created however I tested with adding repository with ' sudo apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main" and sudo apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-yakkety main"

I am able to install Kubeadm, Kubectl & kubelet on Ubuntu 18.04 with codename *bionic**....

Please make sure to add GPG key as it is recommended & good practice to follow otherwise this creates vulnerability to push malicious code through proper package name...

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

You can check by yourself what all repository are present on dists - https://packages.cloud.google.com/apt/dists/

You can also verify whether the repository has been added to /etc/apt/source.list or /etc/apt/source.list.d, if it is there then you should be fine....

Share:
10,268
Jordy van Eijk
Author by

Jordy van Eijk

I'm a Software / Blockchain engineer foccusing primarly at .net solutions

Updated on June 09, 2022

Comments

  • Jordy van Eijk
    Jordy van Eijk almost 2 years

    I'm trying to install Kubernetes on my Ubuntu server/desktop version 18.04.1. But, when I want to add kubernetes to the apt repository using the following command:

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

    I get the following error:

    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.
    

    If I then try to install kubeadm, it does not work because I don't have the repository added to apt

    I hope someone can shed some light on my issue..

    All of this is running inside a VM on Hyper-V

    PS: I'm not a die hard Linux expert but coming from Windows!

  • secavfr
    secavfr about 3 years
    Still none in 2021. Only kubernetes-xenial worked for me with Ubuntu 18.04.