Kubernetes storage autoscaling automatically increases persistent volume capacity as usage grows, subject to policy and cloud-provider limits. A storage autoscaler monitors eligible volumes and requests expansion through their PersistentVolumeClaims (PVCs). Some implementations also adjust provisioned IOPS and throughput on supported disks. Capacity expansion and performance tuning solve different problems and should have separate controls.
A database volume filling at 3 a.m. is often the consequence of an old sizing estimate. Overprovisioning buys time, but leaves teams paying for capacity they may not need. Autoscaling replaces that fixed guess with a monitored decision: when to grow, by how much, and when to stop for human review.
This guide explains native PVC expansion, safe automation, provider modification limits, and a staged rollout using Cast AI as a concrete example. It focuses on persistent storage; for incident diagnosis, start with disk full versus an IOPS bottleneck.
Key takeaways
- Kubernetes storage autoscaling expands eligible PVCs as usage grows; it does not shrink existing volumes.
- Capacity, IOPS, and throughput solve different problems and need separate policy controls.
- Safe expansion depends on CSI driver support, sufficient free-space headroom, and cloud-provider modification limits.
- Start with scoped dry-run policies, workload-specific capacity caps, alerts, and clear ownership between controllers.
- Measure application reliability, provisioned storage and performance costs, and operating effort separately.
What does Kubernetes storage autoscaling change?
| Control | What changes | What it does not solve |
|---|---|---|
| Capacity expansion | The requested size of an existing PVC and its backing volume | An IOPS bottleneck, unlimited growth, or automatic shrinking |
| Performance tuning | Provisioned IOPS or throughput, where the disk type supports it | A full filesystem without enough capacity |
| Node or pod autoscaling | Compute capacity or workload replicas | Automatic expansion of an existing persistent volume |
A PersistentVolume (PV) represents storage available to the cluster; a PVC is the workload’s claim on that storage. A StorageClass describes how storage is provisioned. The CSI driver connects Kubernetes storage operations to the underlying provider. An autoscaler supplies the decision loop around these mechanisms.
Do not confuse PVC capacity with node ephemeral storage, container writable layers, or an emptyDir volume. Those need different remediation. A database can also exhaust inodes or reach an application-specific limit while bytes remain available; alert on the failure mode your workload actually has.
How native PVC expansion works
Kubernetes supports expansion when the StorageClass has allowVolumeExpansion: true and the storage driver supports the operation. Increasing the PVC storage request starts the expansion process. The CSI controller expands the backing storage; node-side or filesystem expansion follows where required. Check driver and filesystem support before assuming expansion is online. See the Kubernetes persistent volume documentation.
Native expansion does not by itself decide when a volume is nearly full. That decision comes from an operator, script, or autoscaling controller. Likewise, VolumeAttributesClass can express supported volume attribute changes, but does not supply a usage-based autoscaling policy.
- Inventory PVCs, their StorageClasses, disk types, and owning workloads.
- Confirm expansion support, required permissions, and a tested backup and recovery path.
- Observe the PVC, provider operation, filesystem capacity, and application health during a controlled resize.
- Treat capacity increases as one-way: Kubernetes does not support shrinking an existing PVC. Moving to smaller storage requires a separately planned data migration and validation.
How an autoscaler decides when to expand
A useful decision combines Kubernetes state, volume usage, and cloud disk metadata. The controller needs to know which claim owns the disk, how quickly free space is disappearing, whether a previous change is still running, and whether another modification is allowed. Performance decisions additionally need IOPS, throughput, and latency context.
Cast AI separates capacity expansion from performance rightsizing. The documented capacity defaults are shown below; they are starting values, not universal production recommendations. The configuration reference is the source of truth for supported fields and defaults.
| Capacity setting | Documented default | Purpose |
|---|---|---|
| Usage threshold | 80% | Start evaluating sustained high utilization |
| Threshold period | 5 minutes | Avoid reacting to a brief spike |
| Growth step | 20% | Add proportional headroom |
| Minimum increment | 5 GiB | Avoid tiny changes on small volumes |
| Policy cooldown | 30 minutes | Space out capacity decisions; provider restrictions still apply |

In this illustrative timeline, usage crosses the threshold at 09:12 and remains above it for five minutes. A 20% increase takes a 200 GiB volume to 240 GiB. That is an expansion request, not a promise that the application sees the extra space at 09:17. Provider processing and any required filesystem expansion must finish first. If 176 GiB is used when expansion completes and usage has not grown further, utilization becomes about 73%.
Plan headroom against write growth and the entire delay budget. A rough time-to-full estimate is available free space divided by net growth per hour. Compare it with the threshold period, any remaining provider restriction, resize completion time, and an operational margin. Bursty ingestion and backfills require additional headroom because recent average growth can understate the next spike.
Set scope, growth caps, and an escalation path
The policy should state which volumes can change, which dimensions can change, and where automation must stop. Start with a namespace and an explicit PVC label or name. Review every matching policy: adding a narrowly scoped policy does not automatically exclude volumes covered by an existing broad policy.
- Set a capacity ceiling based on the workload’s budget and operating limits, rather than copying a generic 500 GiB or 1 TiB cap.
- Choose growth increments large enough to survive the next modification window, while avoiding unnecessary permanent capacity.
- Alert before the ceiling is reached, with an owner and a response for continued growth.
- Keep performance and capacity controls separate so a capacity rollout does not also change latency-sensitive settings.
- Document how to pause automation, review actions, and recover from an unsuccessful expansion.
In Cast AI, the highest-priority matching PVPolicy wins and PVC annotations can override policy settings. A per-volume capacity ceiling is configured with the storage.cast.ai/storage-size-max PVC annotation. A cap limits automated growth; it does not guarantee that a workload stays healthy after reaching that cap. Continue monitoring free space and application errors.
Respect cloud modification limits during an incident
A policy cooldown cannot override a cloud-provider restriction. AWS EBS allows up to four modifications per volume in a rolling 24-hour period, and a previous modification must complete before another begins. See the AWS ModifyVolume reference. Modification duration varies, so do not assume a fixed six-hour completion time.
Google Cloud restrictions depend on the Hyperdisk type and on whether you change size, IOPS, or throughput. For example, Hyperdisk Throughput size changes have a six-hour interval, while Hyperdisk Balanced size changes allow two changes in a four-hour window. Performance changes have their own rules. Use the current Hyperdisk modification documentation for the actual disk and operation; a single “GCP cooldown” is misleading.
If expansion is blocked while free space is running out, repeated resize requests will not remove the restriction. Inspect provider operation status and PVC events, then follow the workload’s incident runbook: reduce or pause ingestion where safe, redirect writes using a supported failover path, or remove only data that is safe to delete. Never delete database files to make room. Revisit the threshold, growth step, and escalation timing after recovery.
Test storage autoscaling before production
Start with a representative non-production workload in dry-run mode. Review proposed changes across normal traffic and a known peak, such as a batch load or maintenance job. A fixed number of days is less useful than covering the workload’s actual cycle. Then enable a controlled expansion and verify the end-to-end result before increasing scope.
The following Cast AI policy example selects PVCs labeled storage-autoscaling: pilot in the storage-pilot namespace. It keeps changes in dry-run mode and enables only capacity recommendations. Adapt the names and priority to your cluster, and confirm that the label exists on the PVC itself.
apiVersion: storage.cast.ai/v1alpha1
kind: PVPolicy
metadata:
name: storage-pilot
namespace: castai-agent
spec:
priority: 100
dryRun: true
selector:
namespaces:
- storage-pilot
pvc:
labels:
matchLabels:
storage-autoscaling: pilot
config:
dimensions:
storageEnabled: true
iopsEnabled: false
throughputEnabled: false
storage:
thresholdPercent: 80
thresholdPeriod: "5m"
growthPercent: 20
minGrowthStepGiB: 5
cooldownPeriod: "30m"For a selected PVC, an illustrative 500 GiB ceiling belongs in its metadata annotations. Merge this fragment into the existing PVC configuration; it is not a complete PVC manifest or a recommendation that every workload use this limit.
metadata:
annotations:
storage.cast.ai/storage-size-max: "500Gi"Keep any default or broader policy in dry-run mode while testing. After creation, the policy’s spec.dryRun controls its behavior; changing a Helm default is not a substitute for checking the live policy. Dry-run describes whether the controller applies changes, not a guarantee that its cloud identity has read-only permissions. Follow the installation and permission requirements.
- Confirm the intended PVCs match and unrelated PVCs do not. Inspect priorities and annotation overrides.
- Verify that dry-run produces recommendations without changing requested capacity or cloud settings.
- Exercise sustained growth, a brief spike, a reached capacity ceiling, and a provider-blocked change.
- Enable a small pilot deliberately, then check PVC status, actual filesystem space, application writes, latency, and alerts.
- Record the action and outcome. Returning to dry-run stops subsequent automated changes; it does not undo an expansion already performed.
Should you buy a storage autoscaler or maintain resize scripts?
Both approaches can work. A small, stable environment may be served by a maintained script or an open-source controller. A larger fleet may justify a supported product with common policies and visibility. Compare the full operational responsibility, not just the code that updates a PVC.
| Decision area | Self-managed automation | Managed product evaluation |
|---|---|---|
| Coverage | You choose and maintain supported drivers, disks, and edge cases | Verify your exact provider, driver, disk type, and Kubernetes version |
| Safety | Implement selection, limits, dry-run, retries, and conflict handling | Demonstrate those controls on representative workloads |
| Operations | Own alerts, change history, upgrades, and incident support | Check auditability, support, permissions, and failure behavior |
| Cost | Include engineering time and ongoing maintenance | Compare subscription cost plus operating effort and measured infrastructure impact |
Ask either solution to show why it proposed a change, what prevented an action, and what happened after it acted. Do not infer safety from the number of lines in a script or the presence of a product dashboard.
Coordinate with database operators and other controllers
A database operator may already manage PVC sizes or reconcile them from a database custom resource. Check that operator’s documented expansion behavior before introducing another writer. Agree which controller owns capacity and which, if any, owns performance. Two controllers reconciling incompatible desired values can undo each other’s work or create repeated changes.
If ownership is unclear, leave those volumes out of the active pilot and inspect recommendations in dry-run. Where the operator already handles capacity safely, a storage autoscaler may still add fleet visibility, shared guardrails, or supported performance tuning—but only after verifying that the integration does not conflict. The same ownership check applies to VolumeAttributesClass-based performance management.
Tune IOPS and throughput separately from capacity
A volume can have ample free space and still be slow. IOPS measures operation rate; throughput measures bytes transferred per second. Check both against workload latency and the limits of the disk, node, and application. Enlarging a volume is not a general fix for all performance bottlenecks.
For provider-specific settings and a measured tuning workflow, see our guide to EBS gp3 and GKE Hyperdisk IOPS and throughput tuning.
Cast AI’s documented default performance target uses the observed six-hour maximum with 20% overhead, with separate warmup and change-cooldown settings. This is a history-based recommendation, not a forecast of an unseen peak. Review representative traffic, provider minimums, and business-critical latency before enabling downward adjustments.

The illustration uses a 3,400 IOPS peak and a 20% buffer, producing a 4,080 IOPS target before other constraints. Moving from 12,000 to 4,080 provisioned IOPS would reduce the provisioned amount by 7,920 IOPS. Actual savings depend on pricing, included baseline performance, configuration limits, and the time spent at each setting; this is not a measured customer result.
| Disk family | Performance dimension to evaluate |
|---|---|
| Amazon EBS gp3 | Separately provisioned IOPS and throughput |
| Amazon EBS io1 / io2 | Provisioned IOPS; throughput is not an independent gp3-style setting |
| Google Hyperdisk Balanced | IOPS and throughput, subject to their respective constraints |
| Google Hyperdisk Extreme | Provisioned IOPS |
| Google Hyperdisk Throughput | Provisioned throughput |
Support and allowed combinations depend on the disk type and platform. Consult the current Cast AI storage support documentation before enabling a dimension. Keep detailed performance tuning separate from the capacity policy so each change has a clear reason and owner.
Measure reliability and total cost
Establish a baseline before enabling changes, then compare similar workloads over comparable traffic and retention periods. Track outcomes per volume or per workload so changes in fleet size do not disguise a regression. An expansion event alone is not proof that an incident was prevented.
| Measure | What to record |
|---|---|
| Reliability | Disk-full events, write failures, storage-related incidents, and application latency |
| Expansion health | Requested versus completed changes, duration, failed operations, and stuck PVC conditions |
| Policy health | Reached caps, provider-limit blocks, excluded volumes, and manual overrides |
| Capacity cost | Provisioned GiB-days alongside used capacity and retained data growth |
| Performance cost | Billable IOPS and throughput over time, with regional prices and included baselines |
| Operating effort | On-call time, manual resizing, maintenance work, and product cost |
Capacity autoscaling can reduce the need to allocate excessive headroom in advance, but it does not shrink existing volumes. Performance rightsizing can lower provisioned performance on supported disks. Report these effects separately, and include migrations, storage growth, and workload changes when explaining the total bill.
How Cast AI fits into a safe storage rollout
Cast AI Storage Autoscaler is generally available (GA), providing policy-driven capacity expansion and supported performance tuning for EKS and GKE. Its installation documentation specifies Kubernetes 1.29 or later and the required cloud and cluster permissions. Verify your supported configuration and test policies before a production rollout.
Use the Storage Autoscaler workflow to connect policy decisions to the underlying changes. Begin with dry-run, establish ownership and alerts, validate one representative workload, and expand scope after the observed behavior meets your acceptance criteria. Kvisor supports dashboard metrics; the documentation distinguishes that visibility requirement from the autoscaling controller itself.
To begin assessing your environment, start a free trial in read-only mode. Enabling storage changes is a separate rollout step with its own permissions and policy review.
Frequently asked questions
Should I buy a Kubernetes storage autoscaler or maintain resize scripts?
Choose based on the cost of operating the complete system. Self-managed automation can suit a small, stable environment, but you must maintain selection rules, limits, provider handling, auditability, and incident support. Evaluate a product against the same requirements and test it on your actual storage stack.
How do I test PVC expansion safely before production?
Start in dry-run on selected non-production PVCs and review recommendations across representative traffic. Then enable a controlled expansion and verify cloud operation completion, PVC status, filesystem capacity, application writes, and alerts. Test reached caps and blocked changes before widening scope.
Can I autoscale only selected namespaces or volumes?
Yes, when the controller supports explicit selectors. Cast AI PVPolicy can select namespaces and PVC names, labels, or StorageClasses. Review all matching policies and annotation overrides: a narrow pilot policy does not exclude volumes covered by a broader policy.
How do I limit automatic storage growth?
Set a workload-specific capacity ceiling, growth increment, and cooldown, then alert before the ceiling is reached. Cast AI supports the storage.cast.ai/storage-size-max PVC annotation for a per-volume capacity cap. The cap stops further automated growth; it does not stop the application from filling the volume.
What happens if a cloud modification limit blocks expansion?
The provider may prevent a new change until its restrictions are satisfied. Inspect the operation status and PVC events rather than repeatedly issuing resize requests. If space is running out, follow a safe workload-specific incident response and later adjust headroom and growth policy.
Does a storage autoscaler help if a database operator already manages storage?
It may add visibility, common policies, or supported performance tuning, but first verify the database operator’s behavior. Assign clear ownership of each storage dimension and avoid conflicting controllers. Keep uncertain integrations out of active automation until they are tested.
How do I measure the reliability and cost impact of storage autoscaling?
Compare disk-full incidents, write errors, resize failures, and operating effort before and after rollout, normalized for workload changes. Track provisioned GiB-days and billable performance separately. Capacity expansion does not shrink existing volumes, and an automated resize is not by itself evidence of an avoided outage.



