How to target GKE nodes with SSDs

4/24/2019

I'd like to use nodeSelectorTerms to target scheduling of some pods on Nodes with persistent SSD disks. I've created manually a pool with SSDs but I don't see any special labels regarding type of a disk that nodes in this pool use.

I can try to use cloud.google.com/gke-nodepool label but this looks like a workaround. Plus I'd like to start using node auto-provisioning so these pools can be created dynamically with dynamic names.

-- fkorotkov
google-kubernetes-engine

1 Answer

4/24/2019

The cloud.google.com/gke-nodepool label will contain the name that you have given the node pool, so as you discovered it can be used to steer your workloads.

If you don't want to rely on that GKE-specific label or you don't think the names of your node pools will be knowable a priori you can use the GKE API to set a specific label on a node pool.

-- Robert Bailey
Source: StackOverflow