Installation using Rancher

Pre-Requisites

Rancher Version 2.x

Create a New Cluster

In Rancher UI, navigate to the Clusters page. In the top right, click on the Add Cluster box to create a new cluster.

../../_images/rancher_add_cluster.png

On the Add Cluster page select to create a new cluster from Existing Nodes:

../../_images/rancher_existing_nodes.png

On the Add Cluster page that opens, provide a name for the cluster. Next to the Cluster Options section click the box to Edit as YAML. The configuration for the cluster will open up in an editor in the window.

../../_images/rancher_edit_as_yaml.png

Remove all configuration pertaining to the default network plugin:

../../_images/rancher_delete_network_plugin.png

Ensure that network plugin type none is specified:

../../_images/rancher_network_plugin_none.png

Make any additional changes to the configuration that are appropriate for your environment. When you are ready, click Create and Rancher will create the cluster in the Provisioning state.

../../_images/rancher_cluster_state_provisioning.png

Rancher will also present you with instructions on how to add nodes to the cluster:

../../_images/rancher_add_nodes.png

Before adding nodes to the cluster, ensure the BPF filesystem is mounted. You can persist the configuration using the following commands:

  1. sudo mount bpffs -t bpf /sys/fs/bpf
  2. sudo bash -c "echo 'none /sys/fs/bpf bpf rw,relatime 0 0' >> /etc/fstab"

Next, add nodes to the cluster using the Rancher-provided Docker commands. Be sure to add the appropriate number of nodes required for your cluster. After a few minutes, you will see that the Nodes overview will show an error message in the Rancher UI:

../../_images/rancher_node_not_ready.png

This error is expected. The Kubernetes components are not able to fully communicate with each other because a CNI plugin has not been installed yet.

In the Rancher UI, navigate to Tools -> Catalogs and click the Add Catalog button:

../../_images/rancher_add_catalog.png

In the window that opens, add the official Cilium Helm v3 chart repository to the Rancher catalog:

../../_images/rancher_add_cilium_catalog.png

Once added, you should see the Cilium repository in the catalog list:

../../_images/rancher_catalog_list_success.png

Navigate to the Global Apps list and click the button to Launch an application:

../../_images/rancher_apps_click_launch.png

Provide a name for the application and select the System project in your cluster as the application target:

../../_images/rancher_app_target_project.png

Be sure to configure the application to have cluster-wide scope:

../../_images/rancher_cluster_scope.png

Configure any additional values for the Cilium chart and click Next. The application should deploy within the target cluster and project.

After a few minutes, you should see all nodes as active, and proper deployments of all Cilium objects.

../../_images/rancher_working_cluster.png