The requirements for building Rancher Kubernetes cluster using RKE are shown in the table below.
Table 2. Requirement for RKE cluster on PowerFlex family
Rancher server will be used from Workstation VM.
Rancher Kubernetes Engine (RKE)
RKE is used from Workstation VM.
Kubectl to interact with Kubernetes cluster.
Docker is installed on each RHEL node.
3 RHEL 7.6 nodes with SE Linux and swap disabled
Ensure the nodes must be access using SSH and the required ports must be opened before cluster installation.
PowerFlex CSI is used from the Workstation VM.
The RKE binary is available for Windows and Linux operating system. In this solution, RKE is run from the Linux workstation virtual machine. RKE connects to the nodes using SSH key pairs.
Figure 5. Nodes connect using SSH key
The SSH login used for node access must have access to the Docker socket /var/run/docker.sock on the machine, in order to provide this access, the account must be added as a member of the docker group on the node.
# useradd -m -G docker rke
# su - rke
# mkdir $HOME/.ssh
# chmod 700 $HOME/.ssh
# touch $HOME/.ssh/authorized_keys
$ docker version
The following files are created after SSH key pairing:
$HOME/.ssh/id_rsa (SSH private key, keep this secure)
$HOME/.ssh/id_rsa.pub (SSH public key)
$ cat .ssh/id_rsa.pub | ssh node1 "cat >> .ssh/authorized_keys"
5. Test SSH connectivity by running the following command from the Workstation VM, replacing 'hostname' with each of the Kubernetes nodes IP or hostname.
$ ssh -i $HOME/.ssh/id_rsa rke@hostname docker version