Skip to content

Commit

Permalink
Allow insecure apt k8s repo for cni-plugin windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
coutinhop committed Nov 14, 2024
1 parent 4b3fea3 commit 53c1133
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions process/testing/winfv/create_kubeadm_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update -y
sudo apt update -y
sudo apt remove containerd
sudo apt install containerd.io
sudo rm /etc/containerd/config.toml
Expand All @@ -46,9 +46,10 @@ curl -fsSL --retry 5 "https://pkgs.k8s.io/core:/stable:/v${KUBE_REPO_VERSION}/de
sudo chmod 644 /etc/apt/keyrings/kubernetes-apt-keyring.gpg
# Add the Kubernetes apt repository
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v${KUBE_REPO_VERSION}/deb/ /" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo chmod 644 /etc/apt/sources.list.d/kubernetes.list

K8S_PKG_VERSION=${KUBE_VERSION}-1.1
sudo apt-get update && sudo apt-get install -y kubelet=${K8S_PKG_VERSION} kubeadm=${K8S_PKG_VERSION} kubectl=${K8S_PKG_VERSION}
sudo apt --allow-insecure-repositories update && sudo apt install --allow-unauthenticated -y kubelet=${K8S_PKG_VERSION} kubeadm=${K8S_PKG_VERSION} kubectl=${K8S_PKG_VERSION}
sudo swapoff -a

K8S_VERSION=stable-$(echo ${KUBE_VERSION} | cut -d. -f1,2)
Expand Down

0 comments on commit 53c1133

Please sign in to comment.