• May 30, 2023
  • 2 views
  • 0 Comments
# Add and install repo packages
curl -fsSLo /etc/apt/keyrings/kubernetes-archive-keyring.gpg https://dl.k8s.io/apt/doc/apt-key.gpg

echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list

# update ubuntu 
sudo apt -y update 

# installing kubeadm kubectl and kubelet
sudo apt -y install kubeadm kubelet kubectl kubernetes-cni

# mark hold kubeadm kubectl and kubelet so its not updated along with other packages if someone runs a apt update 
sudo apt-mark hold kubelet kubeadm kubectl