kubernetes why run k3s server on win11 wsl2 error:“Failed to start ContainerManager”err=“system validation failed - wrong number of fields(expected 6,got 7)”

xpcnnkqh  于 2023-08-03  发布在  Kubernetes
关注(0)|答案(1)|浏览(287)

在这个错误发生之前,我可以正确地使用wsl 2上的k3 s服务器。但我已经尝试安装VMware并在VMware上启动虚拟Ubuntu。我已经卸载了VMware的整个文件,但当运行k3 s服务器时,错误发生。

"unable to find data in memory cache" mountpoint="/var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs"
E0711 10:59:36.648074    2373 kubelet.go:1400] "Image garbage collection failed once. Stats initialization may not have completed yet" err="invalid capacity 0 on image filesystem"
I0711 10:59:36.648588    2373 fs_resource_analyzer.go:67] "Starting FS ResourceAnalyzer"
I0711 10:59:36.648648    2373 volume_manager.go:284] "Starting Kubelet Volume Manager"
I0711 10:59:36.648725    2373 desired_state_of_world_populator.go:145] "Desired state populator starts to run"
I0711 10:59:36.649583    2373 server.go:461] "Adding debug handlers to kubelet server"
I0711 10:59:36.666612    2373 cpu_manager.go:214] "Starting CPU manager" policy="none"
I0711 10:59:36.666632    2373 cpu_manager.go:215] "Reconciling" reconcilePeriod="10s"
I0711 10:59:36.666640    2373 state_mem.go:36] "Initialized new in-memory state store"
I0711 10:59:36.666717    2373 state_mem.go:88] "Updated default CPUSet" cpuSet=""
I0711 10:59:36.666733    2373 state_mem.go:96] "Updated CPUSet assignments" assignments=map[]
I0711 10:59:36.666749    2373 policy_none.go:49] "None policy: Start"
I0711 10:59:36.667119    2373 memory_manager.go:169] "Starting memorymanager" policy="None"
I0711 10:59:36.667134    2373 state_mem.go:35] "Initializing new in-memory state store"
I0711 10:59:36.667203    2373 state_mem.go:75] "Updated machine memory state"
E0711 10:59:36.667341    2373 kubelet.go:1480] "Failed to start ContainerManager" err="system validation failed - wrong number of fields (expected 6, got 7)"

字符串
我在win 11上使用wsl 2-ubuntu。win 11上的docker-desktop我已经从GitHub上安装了最新版本的k3 s。
我想知道如何解决这个问题和运行k3 s服务器

2skhul33

2skhul331#

我和你有同样的设置,我遇到了同样的问题。
起初,事情进展顺利。但是第二天,我把我的笔记本电脑从休眠状态中唤醒,你上面描述的问题开始出现。
几个注意事项:

  • 您必须配置WSL2以使用systemd
  • 你不需要docker引擎,因为k3s内置了containerd(一个容器运行时),并且默认设置为使用它而不是docker:

K3s包含并默认为containerd(源代码)
Windows重启后,k3s恢复正常运行。
(note我在配置wsl与systemd一起工作后重新启动了wsl,但这可能还不够)。

相关问题