Updating setup container and kubetools to work with Debian

This commit is contained in:
Jon Archer 2024-05-15 11:41:16 +01:00
parent e481dd85b0
commit 2afbfe08dc
2 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ OSVERSION=$(hostnamectl | awk '/Operating/ { print $4 }')
sudo apt install -y jq sudo apt install -y jq
if [ $MYOS = "Ubuntu" ] if [ $MYOS = "Ubuntu" ] || [ $MYOS = "Debian" ]
then then
### setting up container runtime prereq ### setting up container runtime prereq
cat <<- EOF | sudo tee /etc/modules-load.d/containerd.conf cat <<- EOF | sudo tee /etc/modules-load.d/containerd.conf

View File

@ -26,14 +26,14 @@ KUBEVERSION=$(curl -s https://api.github.com/repos/kubernetes/kubernetes/release
KUBEVERSION=${KUBEVERSION%.*} KUBEVERSION=${KUBEVERSION%.*}
if [ $MYOS = "Ubuntu" ] if [ $MYOS = "Ubuntu" ] || [ $MYOS = "Debian" ]
then then
echo RUNNING UBUNTU CONFIG echo RUNNING UBUNTU/Debian CONFIG
cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf
br_netfilter br_netfilter
EOF EOF
sudo apt-get update && sudo apt-get install -y apt-transport-https curl sudo apt-get update && sudo apt-get install -y apt-transport-https curl gpg
curl -fsSL https://pkgs.k8s.io/core:/stable:/${KUBEVERSION}/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg curl -fsSL https://pkgs.k8s.io/core:/stable:/${KUBEVERSION}/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:/${KUBEVERSION}/deb/ /" | sudo tee /etc/apt/sources.list.d/kubernetes.list echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/${KUBEVERSION}/deb/ /" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sleep 2 sleep 2