1. 準備
- 確保主節點正常,容器執行正常
- 安裝kubernetes三個元件,參考安裝 kubernetes
# 關閉防火牆
systemctl stop firewalld
# 關閉防火牆
kubeadm join {主節點IP}:6443 --token {token} --discovery-token-ca-cert-hash {hash}
#完整命令到主節點機器,自定義的配置目錄裡面檢視 kubeadm-init.log 檔案即可
如果join報錯
[ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward contents are not set to 1
echo "1">/proc/sys/net/ipv4/ip_forward
再次join