Issue in installing kubernetes on linux 20.04

Hi Everyone,

I am trying to install kubernetes on linux 20.04. I am following the below steps.

  1. curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/kubernetes-archive-keyring.gpg

  2. sudo mkdir -p /etc/apt/sources.list.d/

  3. cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
    deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main
    EOF
    4)sudo apt-get update
    Err: 6 https://download.docker.com/sudo apt-get Release
    404 Not Found [IP: 18.239.111.93 443]

    Err: 8 https://packages.cloud.google.com/apt kubernetes-focal Release
    404 Not Found [IP: 142.250.192.78 443]

  4. sudo apt install -y -q kubelet=1.29.2-00 kubectl=1.29.2-00 kubeadm=1.29.2-00
    E: Unable to locate package kubelet
    E: Unable to locate package kubectl
    E: Unable to locate package kubeadm

Step 4 and step 5 are not working. Please assist me in this. I am trying to find solution, but nothing is working.
PS: New to linux and kubernetes.

Thanks in advance.

You’re referencing packages that were deprecated last year and turned off earlier this year.

Also if you are new to linux and k8s, I would highly highly recommend learning linix and more about containers/docker first before jumping into k8s. It will dramatically help you get up to speed quicker on it.

Thankyou so much !

I have one doubt -
when iIdo “sudo apt-get update” I get below error. Do I need to be looking in to those? And how to resolve that?

Err: 6 https://download.docker.com/sudo apt-get Release
404 Not Found [IP: 18.239.111.93 443]

Err: 8 https://packages.cloud.google.com/apt kubernetes-focal Release
404 Not Found [IP: 142.250.192.78 443]

Thanks in advance.

Hey, Pooja,

I followed this tutorial,

I used to reference this tutorial for setting up kubernetes.
When something not working, reply here.

Hi Fabio, thanks for the reply.

I tried the link you shared, while running step 3 command - " sudo apt-get install -y software-properties-common curl apt-transport-https ca-certificates" ,
I am getting error like – E: unable to locate package software-properties-common.

Please let me know what to do.

Thanks in advance.

Try to delete the content of the file/repository of which it provides you the error by running the command “install” and try running it again.