How do I resize Persistent Volumes in ArgoCD with StatefulSets?

0
10
Asked By TechieGamer47 On

I'm trying to get my head around Persistent Volumes in ArgoCD while using a StatefulSet in Kubernetes. I've been working with AWS EKS and I understand that if I create a custom storage class, like EBS CSI, and enable resizing, I can just update the PVC in my git repo, and ArgoCD will handle the resize for me without restarting my pods, assuming I'm using a supported filesystem like ext4.

My confusion lies with StatefulSets: if I want to resize a PVC, I'll have to patch the PVC manually, which won't reflect in my Git repository. Additionally, I'm curious about the storage class used by Helm charts that deploy PVCs, and how I should approach resizing those as well.

4 Answers

Answered By KubeMaster22 On

Actually, you should be using the volumeClaimTemplate field in your StatefulSet. Once you update that in your git repository, ArgoCD will reapply the StatefulSet and Kubernetes should handle updating the PVCs. However, you must be aware that trying to directly modify an existing PVC from a StatefulSet template will lead to errors. The preferred method is to push changes to the StatefulSet in git, delete the StatefulSet with orphan set to true (this keeps the pods running), manually resize the PVC, and then let Argo deploy the StatefulSet again.

Answered By CloudySky77 On

To manually resize a PVC linked to a StatefulSet, you usually need to set the ignore field in your Argo app for that StatefulSet's size, then edit the size directly using the CLI or the Argo UI.

Answered By DevOpsDude99 On

If your PVCs are created through a StatefulSet volume template, updates will need to be done manually, and those changes won't automatically reflect back in your git repo. So, you’ll have to patch it directly in Kubernetes.

Answered By CloudySky77 On

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.