k8s-deploy/installer/templates/worker_cpu.sh.j2
2025-11-24 16:07:11 +08:00

19 lines
536 B
Django/Jinja
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
source ./common.sh
echo "[INFO] === 配置 CPU 工作节点 ==="
echo "[CHECK] 检查虚拟化支持..."
if [ $(grep -E -c '(vmx|svm)' /proc/cpuinfo) -eq 0 ]; then
echo "[ERROR] CPU 不支持虚拟化 (VT-x/AMD-V)KubeVirt 将无法正常工作!"
# exit 1 # 视情况是否强制退出
fi
echo "[INFO] 正在加入集群..."
if [ -f "./join_cluster.sh" ]; then
bash ./join_cluster.sh
else
echo "[ERROR] 未找到 join_cluster.sh。请从 Master 节点拷贝该文件到当前目录。"
exit 1
fi