Skip to content

Commit

Permalink
Add doc about deploying the DHCP daemonset with Multus
Browse files Browse the repository at this point in the history
Also remove doc about customizing the whereabouts image as it can lead to users deploying an image version not compatible with our own chart.
  • Loading branch information
thomasferrandiz committed Jan 5, 2024
1 parent eaaaecb commit 4f8933e
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions docs/install/network_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,11 @@ spec:
Any CNI plugin can be used as secondary CNI plugin for Multus to provide additional network interfaces attached to a pod. However, it is most common to use the CNI plugins maintained by the containernetworking team (bridge, host-device,
macvlan, etc) as secondary CNI plugins for Multus. These containernetworking plugins are automatically deployed when installing Multus. For more information about these plugins, refer to the [containernetworking plugins](https://www.cni.dev/plugins/current) documentation.

To use any of these plugins, a proper NetworkAttachmentDefinition object will need to be created to define the configuration of the secondary network. The definition is then referenced by pod annotations, which Multus will use to provide extra interfaces to that pod. An example using the macvlan cni plugin with Mu is available [in the multus-cni repo](https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/docs/quickstart.md#storing-a-configuration-as-a-custom-resource).
To use any of these plugins, a proper NetworkAttachmentDefinition object will need to be created to define the configuration of the secondary network. The definition is then referenced by pod annotations, which Multus will use to provide extra interfaces to that pod. An example using the macvlan cni plugin with Multus is available [in the multus-cni repo](https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/docs/quickstart.md#storing-a-configuration-as-a-custom-resource).

## Using Multus with the Whereabouts CNI
[Whereabouts](https://github.com/k8snetworkplumbingwg/whereabouts) is an IP Address Management (IPAM) CNI plugin that assigns IP addresses cluster-wide.
Starting with RKE2 1.22, RKE2 includes the option to use Whereabouts with Multus to manage the IP addresses of the additional interfaces created through Multus.
In order to do this, you need to use [HelmChartConfig](../helm.md#customizing-packaged-components-with-helmchartconfig) to configure the Multus CNI to use Whereabouts.
## Using Multus with the DHCP daemonset
Multus provides an optional daemonset to deploy the DHCP daemon required to run the [DHCP IPAM plugin](https://www.cni.dev/plugins/current/ipam/dhcp/).
Starting from RKE2 1.29.1, this can be enabled using [HelmChartConfig](../helm.md#customizing-packaged-components-with-helmchartconfig).

You can do this by using the following HelmChartConfig:
```yaml
Expand All @@ -229,13 +228,20 @@ metadata:
namespace: kube-system
spec:
valuesContent: |-
rke2-whereabouts:
enabled: true
manifests:
dhcpDaemonSet: true
```

This will configure the chart for Multus to use `rke2-whereabouts` as a dependency.
This will configure the chart for Multus to deploy the DHCP daemonset.

NOTE: You should write this file before starting rke2.

If you want to customize the Whereabouts image, this is possible like this:
## Using Multus with the Whereabouts CNI
[Whereabouts](https://github.com/k8snetworkplumbingwg/whereabouts) is an IP Address Management (IPAM) CNI plugin that assigns IP addresses cluster-wide.
Starting with RKE2 1.22, RKE2 includes the option to use Whereabouts with Multus to manage the IP addresses of the additional interfaces created through Multus.
In order to do this, you need to use [HelmChartConfig](../helm.md#customizing-packaged-components-with-helmchartconfig) to configure the Multus CNI to use Whereabouts.

You can do this by using the following HelmChartConfig:
```yaml
# /var/lib/rancher/rke2/server/manifests/rke2-multus-config.yaml
---
Expand All @@ -248,11 +254,10 @@ spec:
valuesContent: |-
rke2-whereabouts:
enabled: true
image:
repository: ghcr.io/k8snetworkplumbingwg/whereabouts
tag: latest-amd64
```

This will configure the chart for Multus to use `rke2-whereabouts` as a dependency.

NOTE: You should write this file before starting rke2.

## Using Multus with SR-IOV (experimental)
Expand Down

0 comments on commit 4f8933e

Please sign in to comment.