keadm-v1.6.1-linux-arm64.tar.gz
下面的2个文件可以不用下载,安装kubeedge时也会自动去下载到/etc/kubeedge/目录,我这里在线github下载很慢,所以提前下载好
kubeedge-v1.6.1-linux-arm64.tar.gz
cloudcore.service
如果github访问不了,或者太慢,使用下面我下载好的地址去下载:
百度网盘下载地址
链接: https://pan.baidu.com/s/11186hOTYK9xSCAN4hHYHuA 密码: q72v
#查看Linux内核版本
uname -r
4.18.0-80.7.2.el7.aarch64
#或者使用 uname -a
#创建文件夹
mkdir /etc/kubeedge/
#把下载的软件复制到/etc/kubeedge/目录,可以不下载这2个文件,安装时会自动从github上下载到/etc/kubeedge/目录
cp kubeedge-v1.6.1-linux-arm64.tar.gz /etc/kubeedge/
cp cloudcore.service /etc/kubeedge/
–advertise-address=“116.0.0.123” kubeedge的cloudcore的IP,edge边缘节点能访问的IP,如果公网访问,建议使用外网IP
–kubeedge-version=1.6.1 kubeedge的版本,会去下载指定版本的kubeedge包
#解压keadm
tar -zxvf keadm-v1.6.1-linux-arm64.tar.gz
#初始化安装kubeedge的cloudcore
./keadm-v1.6.1-linux-arm64/keadm/keadm init --advertise-address="116.0.0.123" --kubeedge-version=1.6.1
#输出如下信息成功:
version=1.6.1
Kubernetes version verification passed, KubeEdge installation will start...
W0511 14:35:30.146678 3524 warnings.go:67] apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
W0511 14:35:30.154102 3524 warnings.go:67] apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
W0511 14:35:30.159650 3524 warnings.go:67] apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
W0511 14:35:30.164732 3524 warnings.go:67] apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
Expected or Default KubeEdge version 1.6.1 is already downloaded and will checksum for it.
kubeedge-v1.6.1-linux-arm64.tar.gz checksum:
checksum_kubeedge-v1.6.1-linux-arm64.tar.gz.txt content:
Expected or Default KubeEdge version 1.6.1 is already downloaded
[Run as service] start to download service file for cloudcore
[Run as service] success to download service file for cloudcore
kubeedge-v1.6.1-linux-arm64/
kubeedge-v1.6.1-linux-arm64/edge/
kubeedge-v1.6.1-linux-arm64/edge/edgecore
kubeedge-v1.6.1-linux-arm64/cloud/
kubeedge-v1.6.1-linux-arm64/cloud/csidriver/
kubeedge-v1.6.1-linux-arm64/cloud/csidriver/csidriver
kubeedge-v1.6.1-linux-arm64/cloud/admission/
kubeedge-v1.6.1-linux-arm64/cloud/admission/admission
kubeedge-v1.6.1-linux-arm64/cloud/cloudcore/
kubeedge-v1.6.1-linux-arm64/cloud/cloudcore/cloudcore
kubeedge-v1.6.1-linux-arm64/version
KubeEdge cloudcore is running, For logs visit: /var/log/kubeedge/cloudcore.log
CloudCore started
#查看cloudcore的日志
vim /var/log/kubeedge/cloudcore.log
#查看cloudcore启动情况
ps aux|grep cloudcore
#输出如下表示启动:
root 23498 0.1 0.3 1012544 48640 ? Ssl May12 13:11 /usr/local/bin/cloudcore
#查看端口 10000 10002 端口都有了
netstat -tpnl
#如下:
tcp6 0 0 :::10000 :::* LISTEN 23498/cloudcore
tcp6 0 0 :::10002 :::* LISTEN 23498/cloudcore
#查看cloudcore启动状态
systemctl status cloudcore
#如果没有设置开机启动服务则设置 复制开启自启动服务文件
cp /etc/kubeedge/cloudcore.service /etc/systemd/system/cloudcore.service
#添加文件权限
chmod +x /etc/systemd/system/cloudcore.service
#重新加载配置文件
systemctl daemon-reload
#查看cloudcore启动的进程id,然后杀掉
ps aux|grep cloudcore
#输出如下:
root 23498 0.1 0.3 1012544 48640 ? Ssl May12 13:12 /usr/local/bin/cloudcore
#杀掉
kill -9 23498
#启动cloudcore
systemctl start cloudcore
#设置开机自启动
systemctl enable cloudcore.service
#查看cloudcore开机启动状态 enabled:开启, disabled:关闭
systemctl is-enabled cloudcore.service
./keadm-v1.6.1-linux-arm64/keadm/keadm gettoken