From: Pedro Escaleira Date: Mon, 4 Mar 2024 17:07:11 +0000 (+0000) Subject: Fix Bug 2338: updated kubernetes apt repo from apt.kubernetes.io to pkgs.k8s.io X-Git-Tag: release-v16.0-start~50 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=0265b5f5ae3882f9de5dc0ac435a7211f369cd1f;p=osm%2Fdevops.git Fix Bug 2338: updated kubernetes apt repo from apt.kubernetes.io to pkgs.k8s.io Change-Id: I72bb442fb5c69e5dc48e7f8272df912bd56ad9bc Signed-off-by: Pedro Escaleira --- diff --git a/installers/install_kubeadm_cluster.sh b/installers/install_kubeadm_cluster.sh index fa89a9a2..1636adf1 100755 --- a/installers/install_kubeadm_cluster.sh +++ b/installers/install_kubeadm_cluster.sh @@ -15,7 +15,8 @@ set +eux -K8S_VERSION=1.28.2-00 +K8S_VERSION=1.28 +K8S_PACKAGE_VERSION="$K8S_VERSION".2-1.1 # installs kubernetes packages function install_kube() { @@ -24,11 +25,11 @@ function install_kube() { # To check other available versions, run the following command # curl -s https://packages.cloud.google.com/apt/dists/kubernetes-xenial/main/binary-amd64/Packages | grep Version | awk '{print $2}' sudo apt-get -y update && sudo apt-get install -y apt-transport-https ca-certificates curl - curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.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 + curl -fsSL https://pkgs.k8s.io/core:/stable:/v"$K8S_VERSION"/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg + echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v'$K8S_VERSION'/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list sudo apt-get -y update echo "Installing Kubernetes Packages ..." - sudo apt-get install -y kubelet=${K8S_VERSION} kubeadm=${K8S_VERSION} kubectl=${K8S_VERSION} + sudo apt-get install -y kubelet=${K8S_PACKAGE_VERSION} kubeadm=${K8S_PACKAGE_VERSION} kubectl=${K8S_PACKAGE_VERSION} sudo apt-mark hold kubelet kubeadm kubectl [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function }