I am on EKS 1.24
and using ElasticSearch 6.5.4
helm chart.
I followed below steps to make updates to the disk size.
volumeClaimTemplates:
- metadata:
name: elasticsearch-data
spec:
{{ if and (.Values.enableEncryption) (eq .Values.enableEncryption true) }}
storageClassName: gp2-encrypted
{{ end }}
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: {{ .Values.volumeSize }}Gi
- Updated
spec.resources.requests.storage
underhelm/templates
to the new desired value - Performed
helm upgrade
- I got below error
Error: UPGRADE FAILED: cannot patch "elasticsearch" with kind StatefulSet: StatefulSet.apps "elasticsearch" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden
Possible solutions -
- Delete the existing statefulset and apply new one with updated values -
kubectl delete statefulset elasticsearch && kubectl apply -f new-statefulset.yaml
- Deploy ES in multi-mode where Master, data and client will have a separate role
Now I am looking for a solution where I can handle it in existing helm chart configuration instead of converting my helm chart to multi