CNI Plugin Support

Understanding CNI plugin support

DC/OS works with any type of container network interface (CNI) network. Use a CNI to allow your containers to communicate with one another when they are isolated from the hosts they are running on.

Configuring your Cluster for CNI

Add your plugin and configuration file to each agent on your cluster. Consult the CNI specification to learn more about CNI plugins and configuration.

  1. Add your plugin file to the /opt/mesosphere/active/cni/ directory.

  2. Add your configuration file to the /opt/mesosphere/etc/dcos/network/cni/ directory. A typical configuration file looks like this.

    1. {
    2. "name": "dcos",
    3. "type": "bridge",
    4. "bridge": "m-dcos",
    5. "isGateway": true,
    6. "ipMasq": false,
    7. "mtu": 1420,
    8. "ipam": {
    9. "type": "host-local",
    10. "subnet": "9.0.1.0/25",
    11. "routes": [
    12. {
    13. "dst": "0.0.0.0/0"
    14. }
    15. ]
    16. }
    17. }

    The type parameter specifies the name of the plugin. Here, the plugin name is bridge. The name parameter is the name of the network, which you will also use later in your service definition.

Configuring your Service to Use a CNI Plugin

Your service must use the Universal Container Runtime (UCR).

Add the ipAddress.networkName parameter to your service definition. networkName must match the name parameter of the configuration file in the previous step. In our current example, it is dcos.

  1. "ipAddress": {
  2. "networkName": "dcos"
  3. }

Known Limitations

  • When DC/OS is used on RHEL 7.5 with dcos-cni plugin and UCR (Universal Runtime Container), the layer-4 load-balancing functionality will not work as expected.