如何删除disable-agent节点?

环境信息:
K3s 版本:
v1.24.17-k3s1

节点 CPU 架构、操作系统和版本::
Linux iZuf695afpfj97nwie62i8Z 4.18.0-305.19.1.el8_4.x86_64 #1 SMP Wed Sep 15 15:39:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

集群配置:
3 正常server,1 disable-agent server

问题描述:
使用 disable-agent 参数启动的server在node列表中找不到,该如何删除呢

附加上下文/日志:

新节点启动时日志也全是报错

日志
Sep 27 08:35:50 iZuf695afpfj97nwie62i8Z k3s[16630]: E0927 08:35:50.034069   16630 available_controller.go:524] v1beta1.metrics.k8s.io failed with: failing or missing response from https://10.42.0.9:10250/apis/metrics.k8s.io/v1beta1: Get "https://10.42.0.9:10250/apis/metr>
Sep 27 08:35:55 iZuf695afpfj97nwie62i8Z k3s[16630]: E0927 08:35:55.041245   16630 available_controller.go:524] v1beta1.metrics.k8s.io failed with: failing or missing response from https://10.42.0.9:10250/apis/metrics.k8s.io/v1beta1: Get "https://10.42.0.9:10250/apis/metr>
Sep 27 08:35:56 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:35:56.463100   16630 trace.go:219] Trace[567833375]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:44.911) (total time: 131552ms):
Sep 27 08:35:56 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[567833375]: [2m11.552036652s] [2m11.552036652s] END
Sep 27 08:35:56 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:35:56.463164   16630 trace.go:219] Trace[470969042]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:44.911) (total time: 131552ms):
Sep 27 08:35:56 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[470969042]: [2m11.552048767s] [2m11.552048767s] END
Sep 27 08:35:56 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:35:56.463221   16630 trace.go:219] Trace[1680532750]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:44.911) (total time: 131552ms):
Sep 27 08:35:56 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[1680532750]: [2m11.552049044s] [2m11.552049044s] END
Sep 27 08:35:56 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:35:56.463267   16630 trace.go:219] Trace[461575074]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:44.910) (total time: 131552ms):
Sep 27 08:35:56 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[461575074]: [2m11.552298583s] [2m11.552298583s] END
Sep 27 08:35:56 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:35:56.463314   16630 trace.go:219] Trace[1365696721]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:44.910) (total time: 131552ms):
Sep 27 08:35:56 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[1365696721]: [2m11.55250688s] [2m11.55250688s] END
Sep 27 08:36:00 iZuf695afpfj97nwie62i8Z k3s[16630]: E0927 08:36:00.045165   16630 available_controller.go:524] v1beta1.metrics.k8s.io failed with: Operation cannot be fulfilled on apiservices.apiregistration.k8s.io "v1beta1.metrics.k8s.io": the object has been modified; >
Sep 27 08:36:00 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:36:00.559876   16630 trace.go:219] Trace[1747804107]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:49.914) (total time: 130645ms):
Sep 27 08:36:00 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[1747804107]: [2m10.645359751s] [2m10.645359751s] END
Sep 27 08:36:00 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:36:00.559940   16630 trace.go:219] Trace[1576514359]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:49.914) (total time: 130645ms):
Sep 27 08:36:00 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[1576514359]: [2m10.645480628s] [2m10.645480628s] END
Sep 27 08:36:00 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:36:00.559994   16630 trace.go:219] Trace[864745067]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:49.914) (total time: 130645ms):
Sep 27 08:36:00 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[864745067]: [2m10.645804086s] [2m10.645804086s] END
Sep 27 08:36:00 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:36:00.560024   16630 trace.go:219] Trace[1097127971]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:49.914) (total time: 130645ms):
Sep 27 08:36:00 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[1097127971]: [2m10.645607985s] [2m10.645607985s] END
Sep 27 08:36:00 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:36:00.560078   16630 trace.go:219] Trace[763327030]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:49.914) (total time: 130645ms):
Sep 27 08:36:00 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[763327030]: [2m10.645721971s] [2m10.645721971s] END
Sep 27 08:36:04 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:36:04.655053   16630 trace.go:219] Trace[1229255662]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:54.922) (total time: 129732ms):
Sep 27 08:36:04 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[1229255662]: [2m9.732961019s] [2m9.732961019s] END
Sep 27 08:36:04 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:36:04.655088   16630 trace.go:219] Trace[524342520]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:54.922) (total time: 129732ms):
Sep 27 08:36:04 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[524342520]: [2m9.73295453s] [2m9.73295453s] END
Sep 27 08:36:04 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:36:04.655114   16630 trace.go:219] Trace[524331667]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:54.921) (total time: 129733ms):
Sep 27 08:36:04 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[524331667]: [2m9.733251528s] [2m9.733251528s] END
Sep 27 08:36:04 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:36:04.655231   16630 trace.go:219] Trace[778263411]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:54.922) (total time: 129733ms):
Sep 27 08:36:04 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[778263411]: [2m9.733039809s] [2m9.733039809s] END
Sep 27 08:36:04 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:36:04.655272   16630 trace.go:219] Trace[1890409666]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:54.921) (total time: 129733ms):
Sep 27 08:36:04 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[1890409666]: [2m9.7332728s] [2m9.7332728s] END
Sep 27 08:36:05 iZuf695afpfj97nwie62i8Z k3s[16630]: E0927 08:36:05.051896   16630 available_controller.go:524] v1beta1.metrics.k8s.io failed with: failing or missing response from https://10.42.0.9:10250/apis/metrics.k8s.io/v1beta1: Get "https://10.42.0.9:10250/apis/metr>
Sep 27 08:36:06 iZuf695afpfj97nwie62i8Z k3s[16630]: E0927 08:36:06.936002   16630 controller.go:116] loading OpenAPI spec for "v1beta1.metrics.k8s.io" failed with: failed to retrieve openAPI spec, http error: ResponseCode: 503, Body: request timed out, Header: map[]
Sep 27 08:36:06 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:36:06.936025   16630 controller.go:129] OpenAPI AggregationController: action for item v1beta1.metrics.k8s.io: Rate Limited Requeue.
Sep 27 08:36:06 iZuf695afpfj97nwie62i8Z k3s[16630]: E0927 08:36:06.936002   16630 controller.go:113] loading OpenAPI spec for "v1beta1.metrics.k8s.io" failed with: Error, could not get list of group versions for APIService
Sep 27 08:36:06 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:36:06.937246   16630 controller.go:126] OpenAPI AggregationController: action for item v1beta1.metrics.k8s.io: Rate Limited Requeue.
Sep 27 08:36:08 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:36:08.751050   16630 trace.go:219] Trace[502328642]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:59.925) (total time: 128825ms):
Sep 27 08:36:08 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[502328642]: [2m8.825212949s] [2m8.825212949s] END
Sep 27 08:36:08 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:36:08.751153   16630 trace.go:219] Trace[1087712616]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:59.925) (total time: 128825ms):
Sep 27 08:36:08 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[1087712616]: [2m8.825590903s] [2m8.825590903s] END
Sep 27 08:36:08 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:36:08.751219   16630 trace.go:219] Trace[550751943]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:59.925) (total time: 128825ms):
Sep 27 08:36:08 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[550751943]: [2m8.825298004s] [2m8.825298004s] END
Sep 27 08:36:08 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:36:08.751246   16630 trace.go:219] Trace[859698001]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:59.925) (total time: 128825ms):
Sep 27 08:36:08 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[859698001]: [2m8.825482236s] [2m8.825482236s] END
Sep 27 08:36:08 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:36:08.751308   16630 trace.go:219] Trace[2076772727]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:59.925) (total time: 128825ms):
Sep 27 08:36:08 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[2076772727]: [2m8.825602507s] [2m8.825602507s] END
Sep 27 08:36:08 iZuf695afpfj97nwie62i8Z k3s[16630]: I0927 08:36:08.751361   16630 trace.go:219] Trace[917119751]: "Proxy via http_connect protocol over tcp" address:10.42.0.9:10250 (27-Sep-2023 08:33:57.809) (total time: 130941ms):
Sep 27 08:36:08 iZuf695afpfj97nwie62i8Z k3s[16630]: Trace[917119751]: [2m10.941850289s] [2m10.941850289s] END

你说下你的操作命令和重现步骤

直接根据这个文档创建agentless节点,无法删除

你还是把你的具体操作步骤和重现步骤写下吧

  1. 使用k3s启动一个master服务
  2. 然后使用 --disable-agent 启动一个agentless节点
  3. 现在我想要将agentless节点下线,更改为正常节点,并且节点名不改动。
  4. 现在etcd中一直有agentless节点的信息,更改为正常节点也不允许通讯。

如何在etcd中删除这个节点的所有相关信息?

可参考:https://gist.github.com/superseb/0c06164eef5a097c66e810fe91a9d408