PI4 k3s 安装服务器目前无法处理请求
PI4 k3s install server currently unable to handle the request
我正在尝试安装并 运行 一个单节点轻量级 kubernetes 集群,以便在我的 Raspberry pi4 上使用,我在其中找到了 k3s。然而,从我读过或看到的内容来看,我可能遗漏了一些东西,但没有找到我遇到的确切问题的参考(安装后使用简单的 kubectl 命令进行测试):
$ kubectl get nodes
Error from server (ServiceUnavailable): the server is currently unable to handle the request
我引用的安装:
- Turing Pis, multi-node cluster
-> 了解和使用 Ansible 的部分目前看起来有点矫枉过正)
- Pi setup & k3s install -> 很好的教程,但没有类似的配置响应?
$ sudo k3s server
INFO[2020-09-30T06:58:13.488363192+01:00] Starting k3s v1.18.9+k3s1 (630bebf9)
INFO[2020-09-30T06:58:13.489450500+01:00] Cluster bootstrap already complete
FATA[2020-09-30T06:58:13.535582640+01:00] starting kubernetes: preparing server: start cluster and https: listen tcp :6443: bind: address already in use
Presumed that this isn't necessary anymore then, based on the newer installation version.
- complete k3s 101 youtube -> 仍然没有神奇地工作,如图所示。
所以如果有人能够帮助我,或者指导我更好地调试和显示问题的方向,以便我理解并可以解决问题。
安装反馈未显示出现任何问题:
$ 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,肯定 'something' 正在发生在 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 install on Pi4 - live walkthrough) 了解了安装过程的更多信息后,我注意到 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值在文件中的位置,但在endline-character之后,这禁止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
If this still doesn't work, I also saw a recent blog post regarding the same issue (due to raspbian kernal update), where fix is also suggested -> post
我正在尝试安装并 运行 一个单节点轻量级 kubernetes 集群,以便在我的 Raspberry pi4 上使用,我在其中找到了 k3s。然而,从我读过或看到的内容来看,我可能遗漏了一些东西,但没有找到我遇到的确切问题的参考(安装后使用简单的 kubectl 命令进行测试):
$ kubectl get nodes
Error from server (ServiceUnavailable): the server is currently unable to handle the request
我引用的安装:
- Turing Pis, multi-node cluster -> 了解和使用 Ansible 的部分目前看起来有点矫枉过正)
- Pi setup & k3s install -> 很好的教程,但没有类似的配置响应?
$ sudo k3s server
INFO[2020-09-30T06:58:13.488363192+01:00] Starting k3s v1.18.9+k3s1 (630bebf9)
INFO[2020-09-30T06:58:13.489450500+01:00] Cluster bootstrap already complete
FATA[2020-09-30T06:58:13.535582640+01:00] starting kubernetes: preparing server: start cluster and https: listen tcp :6443: bind: address already in use
Presumed that this isn't necessary anymore then, based on the newer installation version.
- complete k3s 101 youtube -> 仍然没有神奇地工作,如图所示。
所以如果有人能够帮助我,或者指导我更好地调试和显示问题的方向,以便我理解并可以解决问题。
安装反馈未显示出现任何问题:
$ 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,肯定 'something' 正在发生在 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 install on Pi4 - live walkthrough) 了解了安装过程的更多信息后,我注意到 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值在文件中的位置,但在endline-character之后,这禁止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
If this still doesn't work, I also saw a recent blog post regarding the same issue (due to raspbian kernal update), where fix is also suggested -> post