Custom dockerd configuration

Configure the Docker daemon

Configure the Docker daemon

For more details on available configuration options, please refer to dockerd documentation.

Mandatory options

The following are the mandatory options to ensure the Docker daemon runs in the kube-nodes.

{
    "bridge": "none",
    "iptables": false,
    "ip-masq": false,
    "storage-driver": "overlay2",
    "storage-opts": [ "overlay2.override_kernel_check=true" ]
},
    "registry-mirrors": ["https://local-registry.example.com"]
}

Configuring

To enable custom dockerd configuration perform the following steps:

  1. Create a new file, for example daemon.json, that enables Docker daemon debug logging:
{
    "bridge": "none",
    "iptables": false,
    "ip-masq": false,
    "storage-driver": "overlay2",
    "storage-opts": [ "overlay2.override_kernel_check=true" ],
    "debug": true
}
  1. Create a DC/OS secret with the configuration file.
$ dcos security secrets create -f daemon.json kubernetes-cluster/dockerd-config

IMPORTANT: The service account for the Kubernetes cluster requires permissions to read the secret containing the Docker daemon configuration.

  1. To enable custom Docker configuration you need to set .kubernetes.docker_daemon_config with the name of the DC/OS secret where the configuration is stored.
{
    "kubernetes": {
        "docker_daemon_config": "kubernetes-cluster/dockerd-config"
    }
}