Skip to content

How to Find the Init Bootstrap Node in Rancher-Managed RKE2 Clusters

Article Number: 000022323

Environment

Rancher v2.5+
RKE2 v1.x

Procedure

This article explains how to obtain RKE2 node bootstrap and join details for downstream clusters using information stored in Rancher-managed Secrets. The command is to be run on the Rancher cluster.

Command:

$ kubectl get secrets -n fleet-default -o custom-columns="NAME:metadata.name,MACHINE_ID:metadata.labels.rke\.cattle\.io/machine-name,INIT_NODE:metadata.labels.rke\.cattle\.io/init-node,JOIN_URL:metadata.annotations.rke\.cattle\.io/join-url,JOINED_TO:metadata.annotations.rke\.cattle\.io/joined-to" | grep -v token

Example Output:

NAME                                                    MACHINE_ID                     INIT_NODE   JOIN_URL                     JOINED_TO
test-rke2-kubeconfig                                    <none>                         <none>      <none>                       <none>
test-rke2-master-rzb57-wj2k6-machine-bootstrap          <none>                         <none>      <none>                       <none>
test-rke2-master-rzb57-wj2k6-machine-plan               test-rke2-master-rzb57-wj2k6   true        https://172.31.40.26:9345
test-rke2-master-rzb57-wj2k6-machine-state              <none>                         <none>      <none>                       <none>
test-rke2-rke-state                                     <none>                         <none>      <none>                       <none>
test-rke2-worker-482hb-7zgrn-machine-bootstrap          <none>                         <none>      <none>                       <none>
test-rke2-worker-482hb-7zgrn-machine-plan               test-rke2-worker-482hb-7zgrn   <none>      https://172.31.38.195:9345   https://172.31.40.26:9345
test-rke2-worker-482hb-7zgrn-machine-state              <none>                         <none>      <none>                       <none>
test-rke2-worker-482hb-j86wk-machine-bootstrap          <none>                         <none>      <none>                       <none>
test-rke2-worker-482hb-j86wk-machine-plan               test-rke2-worker-482hb-j86wk   <none>      https://172.31.40.152:9345   https://172.31.40.26:9345
test-rke2-worker-482hb-j86wk-machine-state              <none>                         <none>      <none>                       <none>
test-rke2-worker-482hb-pfq9c-machine-bootstrap          <none>                         <none>      <none>                       <none>
test-rke2-worker-482hb-pfq9c-machine-plan               test-rke2-worker-482hb-pfq9c   <none>      https://172.31.33.8:9345     https://172.31.40.26:9345
test-rke2-worker-482hb-pfq9c-machine-state              <none>                         <none>      <none>                       <none>

Note: This output shows the RKE2 node bootstrap and join topology. The entry with INIT_NODE=true identifies the initial control-plane (bootstrap) node that created the cluster. Each worker node’s machine-plan entry shows the join URL it used and the control-plane node it joined (JOINED_TO). Entries with <none> are internal state or bootstrap Secrets and do not represent active join relationships.