我在一个小型 4 节点家庭实验室集群(1 个主节点/工作节点 + 3 个工作节点)上运行 k3s 1.26.4。今天,主节点崩溃了,强制重启是唯一的解决方案。从那时起,主节点就拒绝正确启动。
在日志中,我可以看到很多 v1.Event 到转换的错误。以下是摘录:
May 21 18:37:31 oc-1 k3s[6275]: W0521 18:37:31.123758 6275 reflector.go:424] storage/cacher.go:/leases: failed to list *coordination.Lease: converting (v1.Event) to (coordination.Lease): unknown conversion
May 21 18:37:31 oc-1 k3s[6275]: E0521 18:37:31.123782 6275 cacher.go:450] cacher (leases.coordination.k8s.io): unexpected ListAndWatch error: failed to list *coordination.Lease: converting (v1.Event) to (coordination.Lease): unknown conversion; reinitiali>
May 21 18:37:31 oc-1 k3s[6275]: W0521 18:37:31.130061 6275 reflector.go:424] storage/cacher.go:/endpointslices: failed to list *discovery.EndpointSlice: converting (v1.Event) to (discovery.EndpointSlice): unknown conversion
May 21 18:37:31 oc-1 k3s[6275]: E0521 18:37:31.130084 6275 cacher.go:450] cacher (endpointslices.discovery.k8s.io): unexpected ListAndWatch error: failed to list *discovery.EndpointSlice: converting (v1.Event) to (discovery.EndpointSlice): unknown convers>
May 21 18:37:31 oc-1 k3s[6275]: W0521 18:37:31.346605 6275 reflector.go:424] storage/cacher.go:/replicasets: failed to list *apps.ReplicaSet: converting (v1.Event) to (apps.ReplicaSet): unknown conversion
May 21 18:37:31 oc-1 k3s[6275]: E0521 18:37:31.346634 6275 cacher.go:450] cacher (replicasets.apps): unexpected ListAndWatch error: failed to list *apps.ReplicaSet: converting (v1.Event) to (apps.ReplicaSet): unknown conversion; reinitializing...
May 21 18:37:31 oc-1 k3s[6275]: W0521 18:37:31.899668 6275 reflector.go:424] storage/cacher.go:/services/endpoints: failed to list *core.Endpoints: converting (v1.Event) to (core.Endpoints): unknown conversion
May 21 18:37:31 oc-1 k3s[6275]: E0521 18:37:31.899694 6275 cacher.go:450] cacher (endpoints): unexpected ListAndWatch error: failed to list *core.Endpoints: converting (v1.Event) to (core.Endpoints): unknown conversion; reinitializing...
May 21 18:37:31 oc-1 k3s[6275]: W0521 18:37:31.969332 6275 reflector.go:424] storage/cacher.go:/pods: failed to list *core.Pod: converting (v1.Event) to (core.Pod): unknown conversion
May 21 18:37:31 oc-1 k3s[6275]: E0521 18:37:31.969396 6275 cacher.go:450] cacher (pods): unexpected ListAndWatch error: failed to list *core.Pod: converting (v1.Event) to (core.Pod): unknown conversion; reinitializing...
May 21 18:37:32 oc-1 k3s[6275]: W0521 18:37:32.130119 6275 reflector.go:424] storage/cacher.go:/leases: failed to list *coordination.Lease: converting (v1.Event) to (coordination.Lease): unknown conversion
May 21 18:37:32 oc-1 k3s[6275]: E0521 18:37:32.130154 6275 cacher.go:450] cacher (leases.coordination.k8s.io): unexpected ListAndWatch error: failed to list *coordination.Lease: converting (v1.Event) to (coordination.Lease): unknown conversion; reinitiali>
May 21 18:37:32 oc-1 k3s[6275]: W0521 18:37:32.136954 6275 reflector.go:424] storage/cacher.go:/endpointslices: failed to list *discovery.EndpointSlice: converting (v1.Event) to (discovery.EndpointSlice): unknown conversion
May 21 18:37:32 oc-1 k3s[6275]: E0521 18:37:32.136977 6275 cacher.go:450] cacher (endpointslices.discovery.k8s.io): unexpected ListAndWatch error: failed to list *discovery.EndpointSlice: converting (v1.Event) to (discovery.EndpointSlice): unknown convers>
May 21 18:37:32 oc-1 k3s[6275]: W0521 18:37:32.357950 6275 reflector.go:424] storage/cacher.go:/replicasets: failed to list *apps.ReplicaSet: converting (v1.Event) to (apps.ReplicaSet): unknown conversion
May 21 18:37:32 oc-1 k3s[6275]: E0521 18:37:32.358095 6275 cacher.go:450] cacher (replicasets.apps): unexpected ListAndWatch error: failed to list *apps.ReplicaSet: converting (v1.Event) to (apps.ReplicaSet): unknown conversion; reinitializing...
May 21 18:37:32 oc-1 k3s[6275]: E0521 18:37:32.514666 6275 status.go:71] apiserver received an error that is not an metav1.Status: &errors.errorString{s:"converting (v1.Event) to (core.Pod): unknown conversion"}: converting (v1.Event) to (core.Pod): unkno>
May 21 18:37:32 oc-1 k3s[6275]: W0521 18:37:32.514991 6275 reflector.go:424] k8s.io/[email protected]/tools/cache/reflector.go:169: failed to list *v1.Pod: converting (v1.Event) to (core.Pod): unknown conversion
May 21 18:37:32 oc-1 k3s[6275]: E0521 18:37:32.515016 6275 reflector.go:140] k8s.io/[email protected]/tools/cache/reflector.go:169: Failed to watch *v1.Pod: failed to list *v1.Pod: converting (v1.Event) to (core.Pod): unknown conversion
有没有人遇到过类似的问题?你是如何解决的?我不得不承认,我对这里发生的事情有点迷茫……