Creating network attachment definitions

The Multus networks that you create depend on the number of available network interfaces you have for Fusion Data Foundation traffic. You can separate all of the storage traffic onto one of two interfaces where one interface that is used for default Red Hat OpenShift SDN or to further separate storage traffic into client storage traffic (public) and storage replication traffic (private or cluster).

To use Multus, an already working cluster with the correct networking configuration is required. For more information, see Requirements for Multus configuration. The newly created NetworkAttachmentDefinition (NAD) can be selected during the Storage Cluster installation and must be created before the Storage Cluster.

Note: Network attachment definitions can only use the whereabouts IP address management (IPAM), and it must specify the range field. ipRanges and plugin chaining are not supported.

The following example of NetworkAttachmentDefinition for all storage traffic, public, and cluster, on the same interface. It requires one additional interface on all schedulable nodes (Red Hat OpenShift default SDN on separate network interface).

apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
  name: ocs-public-cluster
  namespace: openshift-storage
spec:
  config: '{
  	"cniVersion": "0.3.1",
  	"type": "macvlan",
  	"master": "ens2",
  	"mode": "bridge",
  	"ipam": {
    	    "type": "whereabouts",
    	    "range": "192.168.1.0/24"
  	}
  }'
Note:

All network interface names must be the same on all the nodes that are attached to the Multus network (that is, ens2 for ocs-public-cluster).

The following is an example NetworkAttachmentDefinition for storage traffic on separate Multus networks, public, for client storage traffic, and cluster, for replication traffic. It requires two additional interfaces on Red Hat OpenShift nodes hosting OSD pods and one additional interface on all other schedulable nodes (Red Hat OpenShift default SDN on separate network interface).
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
  name: ocs-public
  namespace: openshift-storage
spec:
  config: '{
  	"cniVersion": "0.3.1",
  	"type": "macvlan",
  	"master": "ens2",
  	"mode": "bridge",
  	"ipam": {
    	    "type": "whereabouts",
    	    "range": "192.168.1.0/24"
  	}
  }'

Example of NetworkAttachmentDefinition:

apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
  name: ocs-cluster
  namespace: openshift-storage
spec:
  config: '{
  	"cniVersion": "0.3.1",
  	"type": "macvlan",
  	"master": "ens3",
  	"mode": "bridge",
  	"ipam": {
    	    "type": "whereabouts",
    	    "range": "192.168.2.0/24"
  	}
  }'
Note:

All network interface names must be the same on all the nodes that are attached to the Multus networks (that is, ens2 for ocs-public, and ens3 for ocs-cluster).