Installing Calico CNI for the Unified Containerizer

This guide details how to add Calico networking to a Mesos Agent with CNI enabled.


  • A Running Mesos v1.0.0+ cluster with CNI enabled on each agent.

    When enabling CNI in Mesos, you will have specified a network_cni_config_dir and network_cni_plugins_dir. We’ll refer to these going forward as $NETWORK_CNI_CONFIG_DIR and $NETWORK_CNI_PLUGINS_DIR, respectively.

  • Docker must be installed and running on each agent in order to run calico/node. Follow the relevant docker installation guide.
  • etcd is used by Calico to store network configurations. See etcd’s docker standalone guide for information on how to quickly get an instance running.


Run the following steps on each agent.

  1. Download the Calico CNI plugin to the $NETWORK_CNI_PLUGINS_DIR you configured for Mesos:
curl -L -o $NETWORK_CNI_PLUGINS_DIR/calico \
chmod +x $NETWORK_CNI_PLUGINS_DIR/calico
  1. Run calico/node, a Docker container with calico’s core routing processes. The calico/node container can easily be launched using calicoctl, Calico’s command line tool. When doing so, we must provide the location of the running etcd instance by setting the ECTD_AUTHORITY environment variable.
curl -L -O \
chmod +x ./calicoctl
sudo ETCD_AUTHORITY=<etcd-ip:port> ./calicoctl node

Next Steps

Now that you have all the necessary components in place, its time to configure a network and launch tasks. See Calico’s Mesos-CNI Usage Guide.