Installing Rancher Downstream Cluster¶
This section involves preparing nodes, creating a cluster, registering nodes, configuring Kubeconfig and verifying cluster status.
Prerequisites¶
The following conditions must be met to configure the cluster.
Node Preparation:
Note
Ensure that you have at least four nodes required to set up the cluster.
- Three master nodes for control plane tasks.
- One worker node for managing workloads and applications.
Hostname | CPU | Memory (GB) | Disk (GB/SSD) | Docker Disk | Data Disk | IP Address | Physical Machine IP |
---|---|---|---|---|---|---|---|
master-01 | 4 | 16 | - | - | - | - | - |
master-02 | 4 | 16 | - | - | - | - | - |
master-03 | 4 | 16 | - | - | - | - | - |
worker-01 | 4 | 16 | - | - | - | - | - |
Node Configuration:
To configure each node for Kubernetes, follow the steps:
- Disable the firewall.
- Disable selinux.
- Set a readable hostname to all the nodes.
- Configure a private DNS to connect to Rancher.
- Install Docker for k8s with a Kubernetes-compatible version.
- Configure cgroup and log settings of Docker.
Creating a cluster¶
To create a cluster, follow the steps:
-
In the "Cluster Management" overview page, click "Clusters" from the left navigation.
-
Choose "Custom".
-
Enter the following details for the cluster creation and then click "Create".
Parameter Description Cluster Name Enter a name for the cluster. Member Roles Select the member role with access to the cluster and determine their permissions. Labels and Annotations Add labels and annotations to the cluster. Kubernetes Version Customize the Kubernetes cluster options.
After completing the cluster creation, Execute the register command to proceed with the remaining steps.
Executing the register command¶
- Navigate to the "Cluster Management" overview page, click the "Registration" tab.
- Copy the register command that includes only the "etcd" and "Control Plane" roles to the master node.
-
Run the command on the "master node" to register it.
-
Copy the register command that includes only the "Worker" role to the worker node.
-
Run the command on the "worker node" to register it.
Setting up Kubeconfig¶
After registering the nodes, wait for the cluster to become ready, configure the kubeconfig
to enable interaction and verify the cluster and node status.