How do I change the Docker Root (/var/lib/docker) to use the /mnt folder ? I am running out of diskspace on my nodes .. the image size is 10gb (microsoft/vsts-agent).
I am using D16s_v3 : 16cores, 64gb memory, 32gb data disk (/dev/sda1), 128GB temporary storage (/dev/sdb1), with premium disk support.
/dev/sdb1 is mounted to /mnt
looks like I have to change the "data-root" variable in /etc/docker/daemon.json. But how to update this when creating/updating a AKS cluster ?
You can use a DaemonSet to manipulate files on the nodes, mounting /
as HostPath
volume. This gist I just made will modify the file as expected; you can then reboot the node to make sure docker will take up the changes. You can use Kured to programmatically reboot nodes as described in this article.
this setting is not configurable with AKS (probably configurable with AKS engine), but you can work around the other way, increase disk dise. if you are using arm template you can specify disk size like this:
{
"name": "nodepool1",
"count": 3,
"vmSize": "Standard_DS1_v2",
"osType": "Linux",
"osDiskSizeGB": 127
}