Managing local storage with "--local-ssd-count" when creating Kubernetes cluster

319 views
Skip to first unread message

Andriy Fomenko

unread,
Jul 19, 2016, 2:52:57 PM7/19/16
to gce-discussion
As I've read Kubernetes 1.3 Release Notes, it looks to be a new "--local-ssd-count" option when creating cluster.

Unfortunately, it is not much documentation around it.

I assume these SSD volumes will be allocated in addition to to the persistent volume of the Kubernetes node so that it can be used for "emptyDir" types of volumes, as a scratch-space for containers.

Anybody could point me in right direction on how do I get to use it this way?

Thanks,
Andriy F.



George (Google Cloud Support)

unread,
Jul 20, 2016, 1:01:13 PM7/20/16
to gce-discussion
Hello Andriy,

I was able to run the following command on my test account, and the result was having one Standard Persistent Disk (100 GB) and 4 additional local ssd disks with 375 GB each attached to each node in the cluster as mentioned here, which can be used for "emptyDir" types of volumes as you mentioned.

gcloud container clusters create NAME --zone ZONE --num-nodes=3 --machine-type=n1-standard-1 --local-ssd-count=4

For future GKE discussions, I would recommend posting on the following Group where our GKE engineers are more active.

I hope this helps

Sincerely,
George

Andriy Fomenko

unread,
Jul 20, 2016, 1:18:53 PM7/20/16
to gce-discussion
Hi George,

Thank you for confirming these will be made available for "emptyDir" usage.

As I'm checking the page you pointed, it does not say if size of these additional SSD volumes could be controlled.
For example, I expect that one SSD local volume with 150-200 GB will be what I need for our application use, but by default I see it allocates 375G per volume.
Am I missing some "secret option" here? :)

Thank you,

Andriy.

George (Google Cloud Support)

unread,
Jul 21, 2016, 11:30:06 AM7/21/16
to gce-discussion
Hello Andriy,

As mentioned in this Help Center article Unlike persistent SSDs, local SSDs have a fixed 375 GB capacity for each device that you attach to the instance. If you want to combine multiple local SSD devices into a single logical volume, you must define volume management across these devices yourself.

I hope this helps.

Sincerely,
George

Andriy Fomenko

unread,
Jul 21, 2016, 11:33:00 AM7/21/16
to gce-discussion
Thank you for clarification.

Andriy Fomenko

unread,
Jul 21, 2016, 11:37:16 AM7/21/16
to gce-discussion
Hi George,

Just to make sure I clearly understand the modus operandi here... 

I was under impression, that cluster creation command will automatically do LVM, formatting and will mount this local SSD storage into the directory where Kubernetes will be able to use it as emptyDir scratch-space.

From your last comment, it looks like it becomes a responsibility for some other entity to perform these steps.

What would be the recommended approcah for this ?

Thank you,
A.F.

George (Google Cloud Support)

unread,
Jul 22, 2016, 11:05:09 AM7/22/16
to gce-discussion
Hello Andriy,

I apologize for the confusion here. When using the gcloud command with the --local-ssd-count flag, a startup script is added to the cluster upon creation that is responsible for formatting and mounting the disks, each one on a different path: /mnt/disks/SSD$

Should you have any GKE related questions, please do not hesitate to open a new discussion on the GKE discussion group.

I hope this helps. 

Sincerely,
George

Reply all
Reply to author
Forward
0 new messages