详细步骤可以参考:使用kubeadm部署生产环境kubernetes集群
git clone https://github.com/huweihuang/kubeadm-scripts.git
bash install-master.sh <MasterDomain> <MasterIP>
kubeadm token create --print-join-command
# 输出
kubeadm join xxx:6443 --token <token> --discovery-token-ca-cert-hash sha256:<hash>
bash join-master.sh <MasterDomain> <MasterIP> <NodeName> <Token> <Hash>
bash install-node.sh <MasterDomain> <MasterIP> <NodeName> <Token> <Hash>
cd master/
bash install-flannel.sh
bash install-dashboard.sh
bash install-metrics-server.sh