Have anyone managed to resize a k8s volume (AWS EBS) with zero downtime on k8s 1.8 without using the volume expansion alpha feature? I’m trying to find a way to do that in one of my Statefulsets clusters (3 replicas) but don’t know how.
With outage, I can do that by simply:
- Scale my Statefulsets to 0 replicas
- Create a snapshot of each of my AWS EBS Volumes
- Provisioning 3 new bigger EBS volumes by using the snapshots created on step 2
- Delete current k8s PVCs and PVs
- Recreate my PVs and PVCs by pointing out to the new EBS volumes provisioned on step 3
- Scale my Statefulsets up again…
But how to do that preventing outage? I cannot use the k8s alpha features and I cannot upgrade my k8s cluster yet.
Another thing I considered was in step 1, scale it down to 1 replica instead, thus I could expand my volumes of the PODs 1 and 2 while POD 0 was still up and running, but how will I do that on POD 0 later on? There's a way to turn of a specific POD of a Stetfulsets? Eg.: Turn off POD 0 in order I can expand its volume after have done for POD 1 and 2?