Shibu
Shibu

Reputation: 115

How can I scale the PVC of a statefulset?

When I try to edit the PVC, Kubernetes gives error saying:

The StatefulSet "es-data" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden.

I am trying to increase the disk size of elasticsearch which is deployed as a statefulset on AKS.

Upvotes: 3

Views: 4358

Answers (2)

Dirc
Dirc

Reputation: 426

It is possible to expand the PVC of a statefulset on AKS, following these four steps: https://stackoverflow.com/a/71175193/4083568

Upvotes: 0

Emruz Hossain
Emruz Hossain

Reputation: 5538

The error is self explaining. You can only update template and updateStrategy part of a StatefulSet. Also, you can't resize a PVC. However, from kubernetes 1.11 you can resize pvc but it is still alpha feature.

Ref: Resizing an in-use PersistentVolumeClaim

Note: Alpha features are not enabled by default and you have to enable manually while creating the cluster.

Upvotes: 1

Related Questions