Skip to main content

Monitor Kubernetes PVC usage with kwatch

ยท 2 min read
Abdelrahman Ahmed
Owner of kwatch

A full PersistentVolumeClaim can take an application down even when every pod looks healthy. kwatch's PVC monitor watches usage and sends a warning or critical alert before the volume reaches capacity.

Configure PVC monitoringโ€‹

The interactive manager is the supported installation and configuration path:

/bin/bash -c "$(curl -fsSL https://kwatch.dev/kwatch.sh)"

Choose Configure settings, then enable or tune the PVC monitor. The equivalent settings are:

pvcMonitor:
enabled: true
interval: 5
threshold: 80
criticalThreshold: 90
clearThreshold: 75

threshold starts a warning, criticalThreshold raises severity for a more serious condition, and clearThreshold prevents a flapping alert from resolving too quickly. See the PVC monitor section for the full setting reference.

Choose an alert channelโ€‹

The manager can configure Teams, Slack, PagerDuty, email, webhooks, and other destinations. Every credential is stored in a Kubernetes Secret and referenced from the config file, for example:

alert:
teams:
webhook: "${file:/config/teams-webhook}"

Use the channel guides to choose a provider and the complete provider reference to see every field.

Verify the alertโ€‹

After the manager reports the workload as ready, check the PVC monitor metrics and wait for the next configured sweep. The example screenshots show the original Teams notification flow:

Configure PVC monitoring for kwatch

kwatch PVC usage alert

You can validate the configuration with kwatch lint. Keep thresholds below your storage provider's hard limit and pair PVC alerts with a runbook explaining how your team expands or cleans up the volume.