[Optional] If you are installing the Logging and Monitoring apps on top of your RKE2 cluster and you want to override the “cattle-logging” and “cattle-prometheus” default namespaces. Set the variables ‘logging_namespace’ and ‘monitoring_namespace’ under ‘rke2_config’ to specify the name of the namespace in which the apps are desired to be installed.
sudo pip3 install acc-provision==6.0.4.1.post1
Generate aci-cni manifests using acc-provision tool with the appropriate RKE2 flavor.
acc-provision -c acc_provision_input.yaml -u <username> -p <password> -f RKE2-kubernetes-1.27 -o rke2-manifests.yaml
Follow the below procedure from the rancher UI for installation:
From Rancher UI, go to Cluster Management and then click on Create.
On the right side of the page, adjust the toggle such that RKE2/K3s option is enabled cluster option. Go on to select the custom cluster option at the bottom of the page.
Enter the Cluster name in the cluster configuration page and select the Kubernetes version.
Add any private registries under the Registries section.
Click on Add-On Config section, copy the generated manifest (rke2-manifests.yaml from pre-requisites step 2 ) into the Additional Manifest UI text box.
Click on ‘Edit Yaml’ option, and change the field ‘cni’ from ‘calico’ (default) to ‘none’
Click on ‘Create’.
From the cluster management page, select the new cluster.
Go to Registration tab. Select the node roles and copy the command.
Go to the node and run the command to register the node in the cluster.
Repeat steps 9 & 10 to register more nodes.
Wait for some time, a bootstrap node will be setup first followed by the rest and the cluster will go to an active state.
This assumes the following two steps have already been performed:
Generate ACI-CNI manifests using acc-provision and the appropriate RKE2 flavor
Create cluster with cni=none, and copy the generated aci-cni manifests in the Add-On Config section of cluster in Rancher UI
sudo apt remove acc-provision
sudo pip3 install acc-provision==6.0.4.1.post1
For using newer images, edit the image tags in registry section of acc_provision_input.yaml to latest release tags
eg: from 6.0.4.1.81c2369 to 6.0.4.2.81c2369
acc-provision -c acc_provision_input.yaml -u <username> -p <password> -f RKE2-kubernetes-1.27 -o rke2-manifests-6041.yaml
Replace the old manifests in Add-On Config section of the cluster on Rancher UI with newly generated manifests
If any variable configuration has to be added/modified/removed, change the configuration accordingly in the input file.
eg: add the variable ‘apic_subscription_delay: 100’ under aci_configsection of acc_provision_input file.
acc-provision -c acc_provision_input.yaml -u <username> -p <password> -f RKE2-kubernetes-1.27 -o rke2-manifests.yaml
On Rancher UI, From Cluster Management Page, select the ‘Edit Config’ option for the cluster whose configuration should be modified
Replace the old manifests in ‘Add-on Config’ section of the cluster on Rancher UI with newly generated manifests and click on save.
Wait until cluster goes to active state.
We can verify the ConfigMap resources in aci-containers-system namespace to see if the variable change is reflected in them. For example, ‘apic_subscription_delay: 100’ is being added in aci-containers-config ConfigMap.
kubectl get cm -n aci-containers-system aci-containers-config -o yaml
Before Update:
After Update:
Click on your cluster from the Cluster Management page, Go to ‘Registration’ tab. Select the node roles and copy the command.
Login to the node you want to register and run the copied command to add the node to cluster.
Wait for some time, the new node will go to Running state and the cluster to an Active state.
Click on your cluster from the Cluster Management page, select the node you want to remove from the cluster and click on the delete option.
Click Delete in the pop-up to confirm deletion.
Notes
You will need to specify any additional proxy configuration in the Agent Environment Vars section while installing, if running behind proxy.