This message was deleted.
# general
a
This message was deleted.
c
Kubernetes picks the primary interface IP associated with the default route as the node IP, if you do not assign one. If you want to override this, you can use the node-ip and node-external-ip config options, as covered in the docs.
but note that this must be done when the node is joined to the cluster, you cannot change node IPs after the fact
so you’d want to delete and re-add your nodes with the proper config
a
@creamy-pencil-82913, i didnt found any specific doc with these settings, if i provide with below config, can it work (for new rke2 cluster).
Copy code
server: <https://192.168.68.25:9345>
token: "<>::server:<>"
tls-san:
    - <node-1-public-ip>
    - <node-2-public-ip>
    - <node-3-public-ip>    
    - 192.168.68.25
    - 192.168.68.26
    - 192.168.68.27
cluster-cidr: "10.42.0.0/16"
service-cidr: "10.43.0.0/16"
write-kubeconfig-mode: "0644"

advertise-address: <node-1-public-ip>
node-ip: 192.168.68.25
node-external-ip: <node-1-public-ip>

kube-apiserver-arg:
  - kubelet-preferred-address-types=InternalDNS,Hostname,ExternalDNS
  - audit-policy-file=/etc/rancher/rke2/audit-policy.yaml
  - audit-log-path=/var/lib/rancher/rke2/server/logs/audit.log
  - audit-log-maxage=15
  - audit-log-maxbackup=10
  - audit-log-maxsize=300

etcd-snapshot-schedule-cron: "0 */12 * * *"
etcd-snapshot-retention: 5
etcd-snapshot-dir: "/var/lib/rancher/rke2/server/db/snapshots"

etcd-expose-metrics: true
disable:
  - rke2-ingress-nginx

container-runtime-endpoint: unix:///run/crio/crio.sock
cni: cilium
All Agent flags are also valid on servers, as servers include a local agent.