参考资料:
https://blog.csdn.net/weixin_43168190/article/details/107380064
https://blog.csdn.net/weixin_46280487/article/details/108950246?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522160385836419724838536402%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=160385836419724838536402&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_v2~rank_v28-8-108950246.first_rank_ecpm_v3_pc_rank_v2&utm_term=kubeedge&spm=1018.2118.3001.4187
https://blog.csdn.net/pinocchione/article/details/109337365
#============
#k8s节点和edge节点上都下载keadm
#----------
wget https://github.com/kubeedge/kubeedge/releases/download/v1.5.0/keadm-v1.5.0-linux-amd64.tar.gz
tar -zxvf keadm-v1.5.0-linux-amd64.tar.gz
cd keadm-v1.5.0-linux-amd64/keadm/
#=======
#k8s节点上执行的操作
#---------
1)keadm init --kubeedge-version=1.5.0 --kube-config=/root/.kube/config
2) ./keadm gettoken
6730f87736b9aae9a2bd9c69a9e8e221d5179ea06e49dad6a3d7280ecfcca1d2.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MDg2MjQxNDB9.-gfS9qAaj-iwDgWE-h_fflbnRaougE6TbWikBh2DYkU
3)
firewall-cmd --permanent --add-port=10000/tcp
firewall-cmd --permanent --add-port=10002/tcp
irewall-cmd --reload
#=========edge
# edge节点上执行的操作
#---------
./keadm join --cloudcore-ipport=10.0.2.12:10000 --token=6730f87736b9aae9a2bd9c69a9e8e221d5179ea06e49dad6a3d7280ecfcca1d2.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MDg2MjQxNDB9.-gfS9qAaj-iwDgWE-h_fflbnRaougE6TbWikBh2DYkU --edgenode-name=edge-01 --kubeedge-version=1.5.0