From 3f90aa2b76e7d1d6e1146af42f38fc8a5d382cf5 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Thu, 3 Oct 2024 10:49:26 +0200 Subject: [PATCH] Update kubernetes installation to load br_netfilter and use version 1.26.15 Change-Id: Ica8e9c1baf4ea16d125ab79e992c4e3f7043f6ee Signed-off-by: garciadeblas --- installers/install_kubeadm_cluster.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/installers/install_kubeadm_cluster.sh b/installers/install_kubeadm_cluster.sh index 793e7da7..108a8ea1 100755 --- a/installers/install_kubeadm_cluster.sh +++ b/installers/install_kubeadm_cluster.sh @@ -16,7 +16,7 @@ set +eux K8S_VERSION=1.26 -K8S_PACKAGE_VERSION="$K8S_VERSION".5-1.1 +K8S_PACKAGE_VERSION="$K8S_VERSION".15-1.1 # installs kubernetes packages function install_kube() { @@ -50,6 +50,10 @@ function check_and_track_kube_install() { # initializes kubernetes control plane function init_kubeadm() { [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function + sudo modprobe br_netfilter + echo "br_netfilter" | sudo tee /etc/modules-load.d/k8s.conf + sudo sysctl -w net.bridge.bridge-nf-call-iptables=1 + echo "net.bridge.bridge-nf-call-iptables=1" | sudo tee /etc/sysctl.d/k8s.conf sudo swapoff -a sudo sed -i.bak '/.*none.*swap/s/^\(.*\)$/#\1/g' /etc/fstab sudo kubeadm init --config $1 --dry-run || FATAL_TRACK k8scluster "kubeadm init dry-run failed" -- 2.25.1