Since Cookiecutter is simply a tool to generate projects from templates, it cannot handle all networking use-cases. Your cluster may include a single interface, two interfaces in bond, bond and management interfaces, and so on.
This section explains how to handle 3 interfaces configuration:
eth0
interface for pxeeth1
and eth2
as bond0
slave interfacesTo configure network interfaces:
Open your MCP Git project repository.
Open the {{ cookiecutter.cluster_name }}/kubernetes/init.yml
file
for editing.
Add the following example definition to this file:
parameters:
…
_param:
deploy_nic: eth0
primary_first_nic: eth1
primary_second_nic: eth2
linux:
...
network:
...
interface:
deploy_nic:
name: ${_param:deploy_nic}
enabled: true
type: eth
proto: static
address: ${_param:deploy_address}
netmask: 255.255.255.0
primary_first_nic:
name: ${_param:primary_first_nic}
enabled: true
type: slave
master: bond0
mtu: 9000
pre_up_cmds:
- /sbin/ethtool --offload eth6 rx off tx off tso off gro off
primary_second_nic:
name: ${_param:primary_second_nic}
type: slave
master: bond0
mtu: 9000
pre_up_cmds:
- /sbin/ethtool --offload eth7 rx off tx off tso off gro off
bond0:
enabled: true
proto: static
type: bond
use_interfaces:
- ${_param:primary_first_nic}
- ${_param:primary_second_nic}
slaves: ${_param:primary_first_nic} ${_param:primary_second_nic}
mode: active-backup
mtu: 9000
address: ${_param:single_address}
netmask: 255.255.255.0
name_servers:
- {{ cookiecutter.dns_server01 }}
- {{ cookiecutter.dns_server02 }}