https://rancher.com/ logo
Title
w

worried-ram-81084

02/20/2023, 1:14 PM
Hello, I hope for you a happy day if you reached here! I'm trying to install RKE2 on a machine that have 2 network interfaces 10.x.x.x and 172.x.x.x and when I finish the installation ETCD advertise it's URL through the 10.x.x.x interface and i want to change it to the 172.x.x.x interface. Is there a way to do so? P.S: the list of things i tried already: 1- https://docs.rke2.io/reference/server_config 2- exec into ETCD pod and change it manually https://manpages.org/etcd Any recommendation?
c

creamy-pencil-82913

02/20/2023, 7:34 PM
Use --node-ip
w

worried-ram-81084

02/21/2023, 4:54 AM
after i install the service or before?
i did after and this is the result:
sd@soss-m1:~$ sudo rke2 server --node-ip 172.16.1.11
[sudo] password for sd: 
WARN[0000] not running in CIS mode                      
INFO[0000] Starting rke2 v1.24.10+rke2r1 (1ccdce2571291649b9414af1f269f645c3fe4002) 
INFO[0000] Managed etcd cluster bootstrap already complete and initialized 
INFO[0000] Starting temporary etcd to reconcile with datastore 
{"level":"info","ts":"2023-02-21T04:55:17.788Z","caller":"embed/etcd.go:131","msg":"configuring peer listeners","listen-peer-urls":["<http://127.0.0.1:2400>"]}
{"level":"info","ts":"2023-02-21T04:55:17.788Z","caller":"embed/etcd.go:139","msg":"configuring client listeners","listen-client-urls":["<http://127.0.0.1:2399>"]}
{"level":"info","ts":"2023-02-21T04:55:17.788Z","caller":"embed/etcd.go:308","msg":"starting an etcd server","etcd-version":"3.5.4","git-sha":"Not provided (use ./build instead of go build)","go-version":"go1.19.5 X:boringcrypto","go-os":"linux","go-arch":"amd64","max-cpu-set":24,"max-cpu-available":24,"member-initialized":true,"name":"soss-m1-5f2ebe5d","data-dir":"/var/lib/rancher/rke2/server/db/etcd-tmp","wal-dir":"","wal-dir-dedicated":"","member-dir":"/var/lib/rancher/rke2/server/db/etcd-tmp/member","force-new-cluster":true,"heartbeat-interval":"500ms","election-timeout":"5s","initial-election-tick-advance":true,"snapshot-count":10000,"snapshot-catchup-entries":5000,"initial-advertise-peer-urls":["<http://127.0.0.1:2400>"],"listen-peer-urls":["<http://127.0.0.1:2400>"],"advertise-client-urls":["<http://127.0.0.1:2399>"],"listen-client-urls":["<http://127.0.0.1:2399>"],"listen-metrics-urls":[],"cors":["*"],"host-whitelist":["*"],"initial-cluster":"","initial-cluster-state":"new","initial-cluster-token":"","quota-size-bytes":2147483648,"pre-vote":true,"initial-corrupt-check":true,"corrupt-check-time-interval":"0s","auto-compaction-mode":"","auto-compaction-retention":"0s","auto-compaction-interval":"0s","discovery-url":"","discovery-proxy":"","downgrade-check-interval":"5s"}
{"level":"info","ts":"2023-02-21T04:55:17.794Z","caller":"etcdserver/backend.go:81","msg":"opened backend db","path":"/var/lib/rancher/rke2/server/db/etcd-tmp/member/snap/db","took":"5.321963ms"}
{"level":"info","ts":"2023-02-21T04:55:18.420Z","caller":"etcdserver/server.go:508","msg":"recovered v2 store from snapshot","snapshot-index":190021,"snapshot-size":"7.1 kB"}
{"level":"info","ts":"2023-02-21T04:55:18.420Z","caller":"etcdserver/server.go:521","msg":"recovered v3 backend from snapshot","backend-size-bytes":24580096,"backend-size":"25 MB","backend-size-in-use-bytes":2396160,"backend-size-in-use":"2.4 MB"}
{"level":"info","ts":"2023-02-21T04:55:18.515Z","caller":"etcdserver/raft.go:556","msg":"forcing restart member","cluster-id":"4b0e36c610e3d0fb","local-member-id":"58334f0709913a29","commit-index":198012}
{"level":"info","ts":"2023-02-21T04:55:18.515Z","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"58334f0709913a29 switched to configuration voters=(6355510390793779753)"}
{"level":"info","ts":"2023-02-21T04:55:18.515Z","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"58334f0709913a29 became follower at term 2"}
{"level":"info","ts":"2023-02-21T04:55:18.516Z","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"newRaft 58334f0709913a29 [peers: [58334f0709913a29], term: 2, commit: 198012, applied: 190021, lastindex: 198012, lastterm: 2]"}
{"level":"info","ts":"2023-02-21T04:55:18.516Z","caller":"api/capability.go:75","msg":"enabled capabilities for version","cluster-version":"3.5"}
{"level":"info","ts":"2023-02-21T04:55:18.516Z","caller":"membership/cluster.go:278","msg":"recovered/added member from store","cluster-id":"4b0e36c610e3d0fb","local-member-id":"58334f0709913a29","recovered-remote-peer-id":"58334f0709913a29","recovered-remote-peer-urls":["<https://10.1.1.11:2380>"]}
{"level":"info","ts":"2023-02-21T04:55:18.516Z","caller":"membership/cluster.go:287","msg":"set cluster version from store","cluster-version":"3.5"}
{"level":"warn","ts":"2023-02-21T04:55:18.516Z","caller":"auth/store.go:1220","msg":"simple token is not cryptographically signed"}
{"level":"info","ts":"2023-02-21T04:55:18.517Z","caller":"mvcc/kvstore.go:345","msg":"restored last compact revision","meta-bucket-name":"meta","meta-bucket-name-key":"finishedCompactRev","restored-compact-revision":183848}
{"level":"info","ts":"2023-02-21T04:55:18.521Z","caller":"mvcc/kvstore.go:415","msg":"kvstore restored","current-rev":185267}
{"level":"info","ts":"2023-02-21T04:55:18.522Z","caller":"etcdserver/quota.go:94","msg":"enabled backend quota with default value","quota-name":"v3-applier","quota-size-bytes":2147483648,"quota-size":"2.1 GB"}
{"level":"info","ts":"2023-02-21T04:55:18.522Z","caller":"etcdserver/corrupt.go:46","msg":"starting initial corruption check","local-member-id":"58334f0709913a29","timeout":"15s"}
{"level":"info","ts":"2023-02-21T04:55:18.523Z","caller":"etcdserver/corrupt.go:116","msg":"initial corruption checking passed; no corruption","local-member-id":"58334f0709913a29"}
{"level":"info","ts":"2023-02-21T04:55:18.523Z","caller":"etcdserver/server.go:842","msg":"starting etcd server","local-member-id":"58334f0709913a29","local-server-version":"3.5.4","cluster-id":"4b0e36c610e3d0fb","cluster-version":"3.5"}
{"level":"info","ts":"2023-02-21T04:55:18.524Z","caller":"etcdserver/server.go:736","msg":"started as single-node; fast-forwarding election ticks","local-member-id":"58334f0709913a29","forward-ticks":9,"forward-duration":"4.5s","election-ticks":10,"election-timeout":"5s"}
{"level":"info","ts":"2023-02-21T04:55:18.528Z","caller":"embed/etcd.go:581","msg":"serving peer traffic","address":"127.0.0.1:2400"}
{"level":"info","ts":"2023-02-21T04:55:18.528Z","caller":"embed/etcd.go:553","msg":"cmux::serve","address":"127.0.0.1:2400"}
{"level":"info","ts":"2023-02-21T04:55:18.528Z","caller":"embed/etcd.go:277","msg":"now serving peer/client/metrics","local-member-id":"58334f0709913a29","initial-advertise-peer-urls":["<http://127.0.0.1:2400>"],"listen-peer-urls":["<http://127.0.0.1:2400>"],"advertise-client-urls":["<http://127.0.0.1:2399>"],"listen-client-urls":["<http://127.0.0.1:2399>"],"listen-metrics-urls":[]}
{"level":"info","ts":"2023-02-21T04:55:20.517Z","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"58334f0709913a29 is starting a new election at term 2"}
{"level":"info","ts":"2023-02-21T04:55:20.517Z","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"58334f0709913a29 became pre-candidate at term 2"}
{"level":"info","ts":"2023-02-21T04:55:20.517Z","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"58334f0709913a29 received MsgPreVoteResp from 58334f0709913a29 at term 2"}
{"level":"info","ts":"2023-02-21T04:55:20.517Z","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"58334f0709913a29 became candidate at term 3"}
{"level":"info","ts":"2023-02-21T04:55:20.517Z","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"58334f0709913a29 received MsgVoteResp from 58334f0709913a29 at term 3"}
{"level":"info","ts":"2023-02-21T04:55:20.517Z","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"58334f0709913a29 became leader at term 3"}
{"level":"info","ts":"2023-02-21T04:55:20.517Z","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"raft.node: 58334f0709913a29 elected leader 58334f0709913a29 at term 3"}
{"level":"info","ts":"2023-02-21T04:55:20.518Z","caller":"etcdserver/server.go:2044","msg":"published local member to cluster through raft","local-member-id":"58334f0709913a29","local-member-attributes":"{Name:soss-m1-5f2ebe5d ClientURLs:[<http://127.0.0.1:2399>]}","request-path":"/0/members/58334f0709913a29/attributes","cluster-id":"4b0e36c610e3d0fb","publish-timeout":"15s"}
{"level":"info","ts":"2023-02-21T04:55:20.518Z","caller":"embed/serve.go:98","msg":"ready to serve client requests"}
{"level":"info","ts":"2023-02-21T04:55:20.520Z","caller":"embed/serve.go:140","msg":"serving client traffic insecurely; this is strongly discouraged!","address":"127.0.0.1:2399"}
INFO[0003] Defragmenting etcd database                  
{"level":"info","ts":"2023-02-21T04:55:20.527Z","caller":"v3rpc/maintenance.go:89","msg":"starting defragment"}
{"level":"info","ts":"2023-02-21T04:55:20.528Z","caller":"backend/backend.go:497","msg":"defragmenting","path":"/var/lib/rancher/rke2/server/db/etcd-tmp/member/snap/db","current-db-size-bytes":24580096,"current-db-size":"25 MB","current-db-size-in-use-bytes":2400256,"current-db-size-in-use":"2.4 MB"}
{"level":"info","ts":"2023-02-21T04:55:20.574Z","caller":"backend/backend.go:549","msg":"finished defragmenting directory","path":"/var/lib/rancher/rke2/server/db/etcd-tmp/member/snap/db","current-db-size-bytes-diff":-22360064,"current-db-size-bytes":2220032,"current-db-size":"2.2 MB","current-db-size-in-use-bytes-diff":-188416,"current-db-size-in-use-bytes":2211840,"current-db-size-in-use":"2.2 MB","took":"46.871867ms"}
{"level":"info","ts":"2023-02-21T04:55:20.574Z","caller":"v3rpc/maintenance.go:95","msg":"finished defragment"}
INFO[0003] etcd temporary data store connection OK      
INFO[0003] Reconciling bootstrap data between datastore and disk 
INFO[0003] stopping etcd                                
{"level":"info","ts":"2023-02-21T04:55:20.608Z","caller":"embed/etcd.go:368","msg":"closing etcd server","name":"soss-m1-5f2ebe5d","data-dir":"/var/lib/rancher/rke2/server/db/etcd-tmp","advertise-peer-urls":["<http://127.0.0.1:2400>"],"advertise-client-urls":["<http://127.0.0.1:2399>"]}
{"level":"info","ts":"2023-02-21T04:55:20.609Z","caller":"etcdserver/server.go:1453","msg":"skipped leadership transfer for single voting member cluster","local-member-id":"58334f0709913a29","current-leader-member-id":"58334f0709913a29"}
INFO[0003] certificate CN=kube-apiserver signed by CN=rke2-server-ca@1676891525: notBefore=2023-02-20 11:12:05 +0000 UTC notAfter=2024-02-21 04:55:20 +0000 UTC 
INFO[0003] certificate CN=etcd-server signed by CN=etcd-server-ca@1676891525: notBefore=2023-02-20 11:12:05 +0000 UTC notAfter=2024-02-21 04:55:20 +0000 UTC 
INFO[0003] certificate CN=etcd-peer signed by CN=etcd-peer-ca@1676891525: notBefore=2023-02-20 11:12:05 +0000 UTC notAfter=2024-02-21 04:55:20 +0000 UTC 
FATA[0003] starting kubernetes: preparing server: init cluster datastore and https: listen tcp :9345: bind: address already in use
or do i need to stop the service and do the command
rke2 server --node-ip
then do it again?
scratch that, i have created the 172.x.x.x and connecte it to the internet and every thing in terms of network works. The real issue is that i can't let a server join the cluster to create HA workers join but the masters just don't want to! and I'm starting to think that they hate me for some reason!! ­čś× i used this command to join them:
rke2 server -s <https://172.16.1.12:9345> -t K10aef68e748f555d57a77707f85b3c051a9f63df57652bf45d8b2302d2d6ad8b7f::server:aac689b20874b0b4bd6bc588709d014e
and i used this command in the server n>1 to set it up:
curl -sfL <https://get.rke2.io> | RKE2_TOKEN=K10aef68e748f555d57a77707f85b3c051a9f63df57652bf45d8b2302d2d6ad8b7f::server:aac689b20874b0b4bd6bc588709d014e sh -s - server --server=<https://172.16.1.11:6443>
but everything i did was in vain ­čś×