参考文档:
https://www.yuque.com/docs/share/314371a1-07de-4f7b-8e2a-16fbc42176b6?#
不执行最后【网络插件配置】步骤
补充执行:
yum install -y wget
swapoff -a
配置flannel
mkdir -p /usr/local/install-k8s/plugin/flannel
cd /usr/local/install-k8s/plugin/flannel
wget https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
kubectl create -f kube-flannel.yml
查看会变成ready状态
[root@k8s-master ~]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
k8s-master Ready control-plane,master 28h v1.21.2
k8s-node1 Ready <none> 28h v1.21.2