Kubernetes PI4 k3s安装服务器当前无法处理该请求
我正试图安装并运行一个单节点轻量级kubernetes集群,在我的Raspberry pi4上玩,我发现了k3s。然而,从我所读到的或看到的来看,我可能遗漏了一些东西,但没有找到我遇到的确切问题的参考(安装后使用简单的kubectl命令进行测试): 我提到的安装:Kubernetes PI4 k3s安装服务器当前无法处理该请求,kubernetes,raspberry-pi,k3s,Kubernetes,Raspberry Pi,K3s,我正试图安装并运行一个单节点轻量级kubernetes集群,在我的Raspberry pi4上玩,我发现了k3s。然而,从我所读到的或看到的来看,我可能遗漏了一些东西,但没有找到我遇到的确切问题的参考(安装后使用简单的kubectl命令进行测试): 我提到的安装: ->了解和使用Ansible的部分目前看来有点过分了) ->很好的教程,但没有类似的配置响应 根据较新的安装版本,假定不再需要这样做 ->如图所示,仍然无法神奇地工作 因此,如果有人能够帮助我,或者指导我更好地调试和显示问题
- ->了解和使用Ansible的部分目前看来有点过分了)
- ->很好的教程,但没有类似的配置响应
- ->如图所示,仍然无法神奇地工作
$ sudo curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--write-kubeconfig-mode 664" sh -
[INFO] Finding release for channel stable
[INFO] Using v1.18.9+k3s1 as release
[INFO] Downloading hash https://github.com/rancher/k3s/releases/download/v1.18.9+k3s1/sha256sum-arm.txt
[INFO] Downloading binary https://github.com/rancher/k3s/releases/download/v1.18.9+k3s1/k3s-armhf
[INFO] Verifying binary download
[INFO] Installing k3s to /usr/local/bin/k3s
[INFO] Creating /usr/local/bin/kubectl symlink to k3s
[INFO] Creating /usr/local/bin/crictl symlink to k3s
[INFO] Creating /usr/local/bin/ctr symlink to k3s
[INFO] Creating killall script /usr/local/bin/k3s-killall.sh
[INFO] Creating uninstall script /usr/local/bin/k3s-uninstall.sh
[INFO] env: Creating environment file /etc/systemd/system/k3s.service.env
[INFO] systemd: Creating service file /etc/systemd/system/k3s.service
[INFO] systemd: Enabling k3s unit
Created symlink /etc/systemd/system/multi-user.target.wants/k3s.service → /etc/systemd/system/k3s.service.
[INFO] systemd: Starting k3s
然后,尝试以下命令:
$ k3s --version
k3s version v1.18.9+k3s1 (630bebf9)
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.9+k3s1", GitCommit:"630bebf94b9dce6b8cd3d402644ed023b3af8f90", GitTreeState:"clean", BuildDate:"2020-09-17T19:04:57Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/arm"}
Error from server (ServiceUnavailable): the server is currently unable to handle the request
$ sudo kubectl get nodes
Error from server (ServiceUnavailable): the server is currently unable to handle the request
$ sudo k3s kubectl get nodes
The connection to the server 127.0.0.1:6443 was refused - did you specify the right host or port?
从htop来看,k3s服务器肯定发生了一些事情:
不确定设备上的k3s服务器+代理是否缺少任何内容或必须更改为主机:
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 raspberrypi
。。。不知道要进一步调试什么???在了解了更多的安装过程后,通过观看此视频(),我注意到k3s在raspbian上作为服务运行 意思是你能够:
# see all listed services, to find the name of the running k3s service
$ systemctl --type=service
# service name ironically being 'k3s', and being able to follow the logs for service
$ journalctl -u k3s -f
但是,在“/boot/cmdline.txt”中查找,这些cgroup值位于文件中的何处,但在一个结束行字符之后,这禁止k3s服务从文件中充分读取。文件内容要求为:
$ sudo cat /boot/cmdline.txt
console=serial0,115200 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait cgroup_enable=1 cgroup_memory=1 cgroup_enable=memory
完成后,我再次查看了journalctl的日志,并注意到其他重要日志,关于pod的容器等。主节点正在运行!:
$ sudo kubectl get nodes
NAME STATUS ROLES AGE VERSION
raspberrypi Ready master 3m52s v1.18.9+k3s1
如果这仍然不起作用,我还看到了最近一篇关于同一问题的博客文章(由于raspbian内核更新),其中还建议修复->
在学习了更多的安装过程之后,通过观看这段视频(),我注意到k3s在raspbian上作为一项服务运行 意思是你能够:
# see all listed services, to find the name of the running k3s service
$ systemctl --type=service
# service name ironically being 'k3s', and being able to follow the logs for service
$ journalctl -u k3s -f
但是,在“/boot/cmdline.txt”中查找,这些cgroup值位于文件中的何处,但在一个结束行字符之后,这禁止k3s服务从文件中充分读取。文件内容要求为:
$ sudo cat /boot/cmdline.txt
console=serial0,115200 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait cgroup_enable=1 cgroup_memory=1 cgroup_enable=memory
完成后,我再次查看了journalctl的日志,并注意到其他重要日志,关于pod的容器等。主节点正在运行!:
$ sudo kubectl get nodes
NAME STATUS ROLES AGE VERSION
raspberrypi Ready master 3m52s v1.18.9+k3s1
如果这仍然不起作用,我还看到了最近一篇关于同一问题的博客文章(由于raspbian内核更新),其中还建议修复->