Raspberry Pi 4 上的 K3S - kubectl get pods 超时 编辑

问题描述

问题

当我将 k3s 代理连接到服务器并在服务器上运行“kubectl get nodes”时。我收到以下错误

root@k3s-master:/home/marc# kubectl get nodes
Error from server (Timeout): the server was unable to return a response in the time allotted,but may still be processing the request (get nodes)

但是如果服务器是独立的,我可以轻松地运行“kubectl get nodes”。

服务器上的 cpu 利用率保持在 30-40% 左右。 RAM使用量为3.74G的583M。

规格

  • 2x RaspBerry Pi 4b 和 4GB RAM
  • 全新安装 raspbian lite (buster)
  • 启用旧版 iptables 和 cgroups

K3S 安装

在服务器上,我已经完成了:

curl -sfL https://get.k3s.io | sh -

关于代理:

curl -sfL https://get.k3s.io | K3S_URL=https://k3s-master:6443 K3S_TOKEN=<token> sh -

提前致谢,它让我发疯!

解决方法

感谢堆栈溢出相关问题功能,我偶然发现了这个问题:PI4 k3s install server currently unable to handle the request

似乎存在有关 buster 内核 5.4.x 的 cgroup 内存故障的问题

编辑

添加 cgroup 没有帮助,所以我切换到 Ubuntu 20.05 并且它现在可以工作了。