Skip to content

Instantly share code, notes, and snippets.

@jhoblitt
Created February 19, 2025 18:16
Show Gist options
  • Save jhoblitt/b1fdd396b3641088f31f1a421787b1ad to your computer and use it in GitHub Desktop.
Save jhoblitt/b1fdd396b3641088f31f1a421787b1ad to your computer and use it in GitHub Desktop.
rke2 fix etcd member peer url
export CRI_CONFIG_FILE=/var/lib/rancher/rke2/agent/etc/crictl.yaml
...
[root@yagan03 rancher]# /var/lib/rancher/rke2/bin/crictl exec 49cb8ba0d8373 etcdctl --cert /var/lib/rancher/rke2/server/tls/etcd/server-client.crt --key /var/lib/rancher/rke2/server/tls/etcd/server-client.key --cacert /var/lib/rancher/rke2/server/tls/etcd/server-ca.crt member list
23fe8fb09d160c69, started, yagan01-60882631, https://139.229.180.1:2380, https://139.229.180.1:2379, false
56d45c007a1663e9, started, yagan04-8f0b5969, https://139.229.180.4:2380, https://139.229.180.4:2379, false
73498b2b56b52d54, started, yagan02-4a05f740, https://139.229.180.2:2380, https://139.229.180.2:2379, false
7c4b2fb7e89203b5, started, yagan03-01987620, https://139.229.180.80:2380, https://139.229.180.3:2379, false
c35e2bc4a7d42c48, started, yagan05-39f67a83, https://139.229.180.5:2380, https://139.229.180.5:2379, false
[root@yagan03 rancher]# /var/lib/rancher/rke2/bin/crictl exec 49cb8ba0d8373 etcdctl --cert /var/lib/rancher/rke2/server/tls/etcd/server-client.crt --key /var/lib/rancher/rke2/server/tls/etcd/server-client.key --cacert /var/lib/rancher/rke2/server/tls/etcd/server-ca.crt member update 7c4b2fb7e89203b5 --peer-urls=https://139.229.180.3:2380
Member 7c4b2fb7e89203b5 updated in cluster ef213744e58cf9a1
[root@yagan03 rancher]# /var/lib/rancher/rke2/bin/crictl exec 49cb8ba0d8373 etcdctl --cert /var/lib/rancher/rke2/server/tls/etcd/server-client.crt --key /var/lib/rancher/rke2/server/tls/etcd/server-client.key --cacert /var/lib/rancher/rke2/server/tls/etcd/server-ca.crt member list
23fe8fb09d160c69, started, yagan01-60882631, https://139.229.180.1:2380, https://139.229.180.1:2379, false
56d45c007a1663e9, started, yagan04-8f0b5969, https://139.229.180.4:2380, https://139.229.180.4:2379, false
73498b2b56b52d54, started, yagan02-4a05f740, https://139.229.180.2:2380, https://139.229.180.2:2379, false
7c4b2fb7e89203b5, started, yagan03-01987620, https://139.229.180.3:2380, https://139.229.180.3:2379, false
c35e2bc4a7d42c48, started, yagan05-39f67a83, https://139.229.180.5:2380, https://139.229.180.5:2379, false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment