This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.11.2.3.4. MACVLAN 额外网络的配置
以下对象描述了 macvlan CNI 插件的配置参数:
字段 | 类型 | 描述 |
---|---|---|
|
|
CNI 规格版本。需要 |
|
|
您之前为 CNO 配置提供的 |
|
|
要配置的 CNI 插件的名称:mac |
|
|
配置虚拟网络上的流量可见性。必须是 |
|
| 与虚拟接口关联的以太网、绑定或 VLAN 接口。如果未指定值,则使用主机系统的主以太网接口。 |
|
| 到指定值的最大传输单元(MTU)。默认值由内核自动设置。 |
|
| IPAM CNI 插件的配置对象。该插件管理网络附加定义的 IP 地址分配。 |
11.2.3.4.1. macvlan 配置示例
以下示例配置了名为 macvlan-net
的额外网络:
{ "cniVersion": "0.3.1", "name": "macvlan-net", "type": "macvlan", "master": "eth1", "mode": "bridge", "ipam": { "type": "dhcp" } }
{
"cniVersion": "0.3.1",
"name": "macvlan-net",
"type": "macvlan",
"master": "eth1",
"mode": "bridge",
"ipam": {
"type": "dhcp"
}
}