cnrancher / autok3s

Run K3s Everywhere
https://www.suse.com
Apache License 2.0
741 stars 76 forks source link

[BUG] autok3s ui show unkown for deleted node #671

Open cynen opened 3 months ago

cynen commented 3 months ago

Describe the bug Docker 部署的Autok3s:v0.9.2 创建基于 k3d的集群后,删除agent节点. (通过explorer 或者 kubectl delete) autok3s ui 展示节点为 Unknown

Environments (please complete the following information):

Additional context 重新添加agent节点后,节点的序号基于之前添加过的数量顺序加. 比如: 之前有2个agent节点, 分别为 agent-0/agent-1 在删除所有agent后,再次添加agent. agent为agent-2 .

cynen commented 3 months ago

image

JacieChao commented 3 months ago

正如之前有人问过类似的问题,通过 kubectl delete 或 kube-explorer ui 删除节点时,AutoK3s 无法感知到,用户从 K3s 中删除了节点,但并未从 AutoK3s 侧的数据中清理掉节点,无法实时同步。 https://github.com/cnrancher/autok3s/issues/648#issuecomment-1842214536

AutoK3s 是一个方便开发运维,快速在多云环境上创建 K3s 集群的小工具,删除集群时也会同步清理相关的资源,如果越过 AutoK3s 手动清理集群资源,则会有类似的未知问题发生,但并不会影响集群的使用。