From 2a1b15170d49bced6ea487aef7c7b0038cd2be85 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 21 Nov 2025 17:55:04 +0800 Subject: [PATCH] bugfix --- cluster-config.yaml | 4 +--- control-plane-install.sh.j2 | 13 +++++++++++++ download_offline_packages.sh.j2 | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/cluster-config.yaml b/cluster-config.yaml index 8d53084..fca9eab 100644 --- a/cluster-config.yaml +++ b/cluster-config.yaml @@ -10,8 +10,6 @@ k8s_version: "1.29.3" containerd_version: "1.7.13" crictl_version: "1.29.0" -kubevirt_version: "v1.28.0" -cdi_version: "v1.65.0" nfs_server: "192.168.16.2" nfs_path: "/d/share/101206" @@ -42,7 +40,7 @@ gpu: # KubeVirt configuration # ===================================================== kubevirt: - version: "1.3.0" + version: "1.6.3" namespace: "kubevirt" # ===================================================== diff --git a/control-plane-install.sh.j2 b/control-plane-install.sh.j2 index 978ae57..5d1a732 100644 --- a/control-plane-install.sh.j2 +++ b/control-plane-install.sh.j2 @@ -15,6 +15,19 @@ sed -i 's/SystemdCgroup = false/SystemdCgroup = true/' /etc/containerd/config.to systemctl enable --now containerd systemctl status containerd +# 加载模块 +modprobe br_netfilter +echo "br_netfilter" > /etc/modules-load.d/br_netfilter.conf + +# 设置网络转发与桥接 +cat < /etc/sysctl.d/99-kubernetes.conf +net.bridge.bridge-nf-call-iptables = 1 +net.bridge.bridge-nf-call-ip6tables = 1 +net.ipv4.ip_forward = 1 +EOF + +sysctl --system + echo "[2] 安装 kubeadm/kubelet/kubectl" install -m755 $OFFLINE/offline-cache/bin/* /usr/local/bin/ diff --git a/download_offline_packages.sh.j2 b/download_offline_packages.sh.j2 index 051331a..f9e75bf 100644 --- a/download_offline_packages.sh.j2 +++ b/download_offline_packages.sh.j2 @@ -12,7 +12,7 @@ mkdir -p $TMP/bin $TMP/manifests $TMP/images $TMP/deps echo "[1] 下载 依赖包" cd $TMP/deps -apt install --download-only nfs-common rpcbind socat containerd +apt install --download-only nfs-common rpcbind socat containerd bridge-utils cp /var/cache/apt/archives/*.deb . curl -LO https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.29.0/crictl-v1.29.0-linux-amd64.tar.gz