Spotinst’s Kubernetes controller supports Kubernetes’ Persistent Volumes (PV) and Persistent Volume Claims(PVC). Persistent Volumes are Kubernetes storage resources, while Persistent Volumes Claims are requests for storage resources which consume PVs. Pods using Persistent Volume Claims to request Persistent Volumes are placed only on nodes in the same Availability Zone as the Persistent Volume. You can utilize Persistent Volumes already created or create them dynamically by using storage classes.
storageClassPVCs, which provision the PVs dynamically if needed and ensure that Pods can always be scheduled.
How it Works:
The Kubernetes Controller monitors Pods for Persistent Volume Claims, ensuring that the Autoscaler respects the PVCs during scaling events.
When Scaling Up
spotinst-controllerroutinely searches for Pods that are pending scheduling.
spotinst-controllerlooks for any Persistent Volume Claims associated with the Pods.
- If PVCs are found, scaling is limited to the Availability Zones (AZs) in which the requested PVs are located.
- Scale up activities limited to specific AZs by Persistent Volume Claims are logged in the Spotinst Console’s Elastilog:
When Scaling Down
- When scaling down the Kubernetes cluster, the controller will prefer not to terminate nodes that have Pods with Persistent Volume Claims. This refers only to PVCs mapped to Persistent Volumes which are not from type NFS.