K8s install fail on orin nx

k8s install fail on orin nx
JP5.1.1

error log:

 kubelet.go:2422] "Error getting node" err="node \"linux\" not found"

Hi,

Could you share your installation steps with us?

Below is a sharing to set Kubernetes for your reference:

Thanks.

Here are the installation steps::

#k8s安装
//关闭swap
swapoff -a # 临时禁用
sed -ri 's/.*swap.*/#&/' /etc/fstab # 永久禁用

//docker配置
在/etc/docker/daemon.json配置文件中加入 "exec-opts": [ "native.cgroupdriver=systemd" ] 
sudo systemctl daemon-reload
sudo systemctl restart docker #重启docker


//安装cri-docker 
https://github.com/Mirantis/cri-dockerd/tags #打开链接下载最新版 (cri-dockerd-0.3.4.arm64.tgz)
tar zxf cri-dockerd-0.3.4.arm64.tgz 
cp cri-dockerd/cri-dockerd /usr/local/bin/

https://github.com/Mirantis/cri-dockerd/tree/master/packaging/systemd  #创建cri-docker启动文件,启动文件从此链接可以找到
vim cri-docker.service (修改.service文件第十行为:ExecStart=/usr/local/bin/cri-dockerd --container-runtime-endpoint fd:// --network-plugin=cni --pod-infra-container-image=registry.aliyuncs.com/google_containers/pause:3.8)
cp cri-docker.service cri-docker.socket /etc/systemd/system/

systemctl daemon-reload
systemctl enable cri-docker.service
systemctl enable --now cri-docker.socket 
systemctl start cri-docker #启动cri-docker并设置开机自动启动
systemctl status cri-docker #查看启动状态

//配置k8s镜像
curl https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | apt-key add - 
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main
EOF
apt-get update
apt-get install -y kubelet=1.23.1-00 kubeadm=1.24.1-00 kubectl=1.24.1-00

//初始化k8s
kubeadm init --kubernetes-version=1.23.1 --apiserver-advertise-address=192.168.162.213 --image-repository registry.aliyuncs.com/google_containers --pod-network-cidr=10.244.0.0/16 --cri-socket /var/run/cri-dockerd.sock

1.24.1和1.23.1、1.23.6都试了。一样的错

k8s部署.txt (1.7 KB)

It’s been solved

Hi,

Thanks for the update.

Would you mind sharing how you fix the issue so other users can benefit from it?

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.