I am totally stuck on installing kube packages and hoping someone here could shed some light.
I am running Ubuntu Server 22.04.1 LTS Jammy
I started with $ sudo apt update && sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
^^ this worked
I then did $sudo apt-get upgrade
Installed docker and it all went fine until I got to these packages, and for three days I can't solve it. Keep reading and I'll explain.
We are attempting to setup a Kubernetes cluster.
I need to install kubelet kubeadm kubectl
But it seems I am following old docs or Kubernetes is badly maintained. I wish I knew. :)
so I added the repo
echo "deb https://apt.kubernetes.io/ kubernetes-jammy main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
First thing I see is I got certificate issues when running apt update.
I then solved that with:
curl -sS https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/cloud.google.gpg
Updated my kubernetes.list with this:
echo "deb [signed-by=/usr/share/keyrings/apt-key.gpg.gpg] https://apt.kubernetes.io/ kubernetes-jammy main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
I then got a forbidden 403 error, and then realised the folder did not exist in the source url "https://packages.cloud.google.com/apt/dists"
So I changed it to Xenial as I have seen a few guides where it has apparently worked on jammy.
for example:
https://www.vladimircicovic.com/2022/08/kubernetes-setup-on-ubuntu-2204-lts-jammy-jellyfish
So removed my source and created this one:
echo "deb [signed-by=/usr/share/keyrings/apt-key.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
But I am still getting forbidden.
Err:4 https://packages.cloud.google.com/apt kubernetes-xenial InRelease
403 Forbidden [IP: 142.250.178.14 443]
Does any know of an easier way to install Kubernetes cluster?
Any help would be appreciated
Chadley