kubernetes / autoscaler

Autoscaling components for Kubernetes
Apache License 2.0
7.82k stars 3.87k forks source link

GCP: Add support for new lssd node types (c3/c3d) #6455

Open brokenjacobs opened 5 months ago

brokenjacobs commented 5 months ago

Which component are you using?: cluster-autoscaler gce cloud provider, auto provisioner

Is your feature request designed to solve a problem? If so describe the problem this feature should solve.: Currently nodepool auto provisioning is not able to provision nodes with nvme attached "Local SSD" storage in GCP. This is because as part of the provisioning process there is no way to request the number of local ssd disks you want to attach to a node through a machine type label. However with the new c3 and c3d node types, google has removed the option to specify how many local ssd's you would like attached, instead automatically provisioning a number of these disks based on the size of the node requested. https://cloud.google.com/compute/docs/disks/add-local-ssd

For third generation machine types (except M3), Local SSD storage is available only with certain machine types, such as c3-standard-88-lssd. A set amount of Local SSD disks are added to the VM when you create it. This is the only way to include Local SSD storage with your VM for third generation machine series.

Per the docs here: https://cloud.google.com/compute/docs/disks/local-ssd#lssd_disks_fixed This means if you request a machine type: c3-standard-4-lssd You receive 1 local nvme ssd, 2 for an 8 cpu machine and so on.

This is great for spot compute workloads that are dynamically provisioned. Unfortunately today the only way to scale a nodepool with local ssd is to create it statically via the GCP API. However since these node types have a static number of disks provisioned, it should be possible to specify the desire for one of these node types via the cloud.google.com/machine-family nodeSelector. Either by specifying a family such as c3-lssd or by specifying an exact type such as c3-standard-4-lssd. Neither one of these options is currently avaiable in the cloud provider code.

Describe the solution you'd like.: A way to provision local ssd storage (with spot compute types) with the nodepool autoprovisioning in the cluster autoscaler on google cloud.

Describe any alternative solutions you've considered.: We currently statically provision nodepools with local ssd storage attached, but this is not as flexible.

Shubham82 commented 5 months ago

/area provider/gce

k8s-triage-robot commented 2 weeks ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale