Skip to content

Instantly share code, notes, and snippets.

@abdennour

abdennour/expand-pvc.md

Last active Aug 26, 2020
Embed
What would you like to do?
Expand kubernetes PVC - Fix No space left on device

0. Collect these info

  • What's your PVC which has space issue ?
  • What's the StorageClassName of that PVC ?

1. Make sure StorageClassName has the following prop :

allowVolumeExpansion: true

https://www.jeffgeerling.com/blog/2019/expanding-k8s-pvs-eks-on-aws

2. Edit PVC spec.resources.requests.storage

spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 30Gi

3. Restart app

# if it's statefulset
k -n namespace rollout restart statefulset/prod-db 

# if it's deployment
k -n namespace rollout restart ddeployment/prod-db 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.