Skip to content

Commit

Permalink
fix google signing key issue by adding k8s mirror
Browse files Browse the repository at this point in the history
Signed-off-by: JooYoung Park <[email protected]>
  • Loading branch information
JooyoungPark73 authored and ustiugov committed Jul 5, 2023
1 parent 1658482 commit 4ab679a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/install_stock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ K8S_VERSION=1.25.3-00
sudo mkdir -p /etc/apt/keyrings
sudo curl -fsSLo /etc/apt/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/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
sudo apt-get update >> /dev/null
if sudo apt-get update | grep "Err"; then
echo "Google GPG server unreachable, Trying k8s mirror"
sudo 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
if sudo apt-get update | grep "Err"; then
echo "GPG server unreachable, check GPG server status" && exit 1
fi
fi
sudo apt-get -y install cri-tools ebtables ethtool kubeadm=$K8S_VERSION kubectl=$K8S_VERSION kubelet=$K8S_VERSION kubernetes-cni >> /dev/null

# Install knative CLI
Expand Down

0 comments on commit 4ab679a

Please sign in to comment.