Setting the root-disk constraint in a juju application to use ssd instead of magnetic on AWS

4/8/2019

When you deploy a Kubernetes cluster with juju on AWS the default root disk of all the master and worker nodes is a 'magnetic' storage. I want to set this to use ssd (gp2) instead.

I cannot find any way to do this per application (e.g. kubernetes-worker) juju get-constrains kubernetes-worker is now => cores=2 mem=4096M root-disk=51200M.

Spinning up new machines always gives me magnetic root disks. https://docs.jujucharms.com/2.5/en/reference-constraints shows all constraints and no mention of 'volume type' or other.

There is a way to make new storage classes and to attach them to machines/units after deploy, but I would like to add it as default per application when adding new units.

-- cm4l
amazon-web-services
juju
kubernetes
storage

1 Answer

4/9/2019

I tried this myself and I wasn't able to create an SSD EBS root volume either. I tried this:

$ juju storage-pools
$ juju model-config storage-default-block-source=ebs-ssd
$ juju deploy canonical-kubernetes --storage data=ebs-ssd,10G,1

It looks like the charms: kubernetes worker, and kubernetes master don't have support for a storage label. But you can see that etcd does have support. So, it's likely one doesn't work with the other, there are also related juju open issues to support storage bindings in bundles.

Hope it helps!

-- Rico
Source: StackOverflow