Automatically grow PVCs on ARO
Summary and Key concepts
Summary This article explains how to use Portworx Autopilot to automatically expand PersistentVolumeClaims (PVCs) when they begin to run out of space. Autopilot monitors PVC usage, and when a threshold is reached, such as exceeding 50% usage, it automatically resizes the PVC. The example provided showcases an Autopilot rule that monitors PostgreSQL PVCs and doubles their size when usage exceeds 50%, up to a maximum size of 400GiB. The article also provides steps to create the necessary Kubernetes resources (namespaces, storage class, PVCs, and PostgreSQL application) and monitor the progress of Autopilot actions using Kubernetes events.
Kubernetes Concepts
- PersistentVolumeClaim (PVC): A request for storage by Kubernetes users. Autopilot automatically resizes PVCs based on predefined conditions.
- StorageClass: Defines how storage is provisioned in a Kubernetes cluster. The article includes an example of a Portworx-backed storage class.
- Namespace: Used to organize Kubernetes objects. In the example, the
namespaceSelector
ensures the rule only applies to specific namespaces.
Portworx Concepts
- Autopilot: Automates storage management tasks such as resizing PVCs when they reach a certain usage threshold.
- AutopilotRule: A custom resource in Portworx that defines the conditions to monitor and the actions to take, such as PVC resizing.