rancher / rancher-docs

Rancher Documentation
https://ranchermanager.docs.rancher.com/
Apache License 2.0
58 stars 202 forks source link

[RKE2] Document separation of etcd and controlplane roles #50

Open axeal opened 2 years ago

axeal commented 2 years ago

Summary: With RKE2 cluster provisioning within Rancher v2.6 it is possible to separate the etcd and controlplane roles on different nodes; however, the RKE2 docs do not document how to do this when provisioning an RKE2 cluster oneself. At a basic level, the process looks something like the below, but this was just my testing in a lab to validate it is possible, not a production-ready config:

Details:

  1. On the etcd node create /etc/rancher/rke2/config.yaml with the following contents: disable-apiserver: true disable-controller-manager: true disable-kube-proxy: false disable-scheduler: true
  2. On the etcd node install rke2 curl -sfL https://get.rke2.io/ | INSTALL_RKE2_VERSION="v1.23.8+rke2r1" INSTALL_RKE2_TYPE="server" sh - and start it systemctl start rke2-server
  3. On the controlplane node create /etc/rancher/rke2/config.yaml with the following contents: server: https://<ip of the etcd node>:9345 token: <token string from /var/lib/rancher/rke2/server/node-token on the etcd node> disable-etcd: true disable-kube-proxy: false etcd-expose-metrics: false
  4. On the controlplane node install rke2 curl -sfL https://get.rke2.io/ | INSTALL_RKE2_VERSION="v1.23.8+rke2r1" INSTALL_RKE2_TYPE="server" sh - and start it systemctl start rke2-server
  5. Add agent nodes (https://docs.rke2.io/install/ha/#5-optional-join-agent-nodes).

Please note this is only an example to show this configuration in a working state. In a real environment, you should configure a fixed registration address per the documentation at https://docs.rke2.io/install/ha/#1-configure-the-fixed-registration-address

brandond commented 2 years ago

We have existing documentation on this for K3s, the process for rke2 is identical: https://rancher.com/docs/k3s/latest/en/installation/disable-flags/

github-actions[bot] commented 1 year ago

This repository uses an automated workflow to automatically label issues which have not had any activity (commit/comment/label) for 90 days. This helps us manage the community issues better. If the issue is still relevant, please add a comment to the issue so the workflow can remove the label and we know it is still valid. If it is no longer relevant (or possibly fixed in the latest release), the workflow will automatically close the issue in 30 days. Thank you for your contributions.