StorageClassName not working
See original GitHub issueChart version: elastic/elasticsearch: 7.7.1
Kubernetes version: 13.2
Kubernetes provider: None
Helm Version: v3.2.1
I am working with elasticsearch on kubernetes. I followed the README instructions to install elasticsearch.
Describe the bug:
Even when I change the storageClassName in volumeClaimTemplate. Every time new pod always shows: Volumes ClaimName: elasticsearch-master-elasticsearch-master-0
, and pod has unbound immediate PersistentVolumeClaims (repeated 4 times)
.
Steps to reproduce:
- helm install release-name ./helm-charts/elasticsearch --set imageTag=7.7.1
Expected behavior:
Three pods are pending. When you type kubectl describe pod elasticsearch-master-0
, it will show pod has unbound immediate PersistentVolumeClaims (repeated 4 times).
Provide logs and/or server output (if relevant):
Volumes:
elasticsearch-master:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: elasticsearch-master-elasticsearch-master-0
ReadOnly: false
default-token-lhrgq:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-lhrgq
Optional: false
QoS Class: Guaranteed
Node-Selectors: <none>
Tolerations: <none>
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 7m40s (x2 over 7m40s) default-scheduler pod has unbound immediate PersistentVolumeClaims (repeated 4 times)
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
kubernetes helm changes storageClassName if provided ...
Helm chart is perfectly working when i apply it for the first time as i have mentioned. It only doesn't work when i...
Read more >1907950 – "storageClassName: manual" does not exist
Specifying storageclassname "manual" in both PVC and PV, and there is no need to have storageclass "manual" present. If there is no storageclassname...
Read more >Persistent Volumes
Managing storage is a distinct problem from managing compute instances. The PersistentVolume subsystem provides an API for users and ...
Read more >Using Storage Classes for Dynamic Provisioning
Now create another claim identical to the generic-pvc.yaml PVC definition but change the name and do not set a storage class name. Example...
Read more >Troubleshooting Cluster Operator
RabbitMQ Cluster Fails to Deploy · Run kubectl describe pod POD-NAME to see if there are any warnings (eg. · Correct the imagePullSecrets...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello, I encountered a similar problem, and it looks like the statefulSet does not declare / use :
persistence.storageClass
persistence.size
It should be put somewhere in the statefulset
volumeClaimTemplate
: https://github.com/elastic/helm-charts/blob/7.9/elasticsearch/templates/statefulset.yaml#L26One (of the many) way of doing it : https://github.com/goharbor/harbor-helm/blob/master/templates/database/database-ss.yaml#L105
Manually provisioning a volume works, but having the possibility to also manually configure the volume name with a property like
persistence.volumeName
would be nice !Thanks !
Hi, @beckyjmcdabq,
Yes you can add
storageClassName
directly involumeClaimTemplate
value like in this example: https://github.com/elastic/helm-charts/blob/58bdd96312a08cf3e933ffa9afb3c7988c27dd80/elasticsearch/examples/kubernetes-kind/values.yaml#L18-L23Well I don’t know why we forgot to add a commented value for it in the default value file https://github.com/elastic/helm-charts/blob/58bdd96312a08cf3e933ffa9afb3c7988c27dd80/elasticsearch/values.yaml#L93-L97
That’s something that could be fixed with a single line PR (adding
#storageClassName: "standard"
to the default values file).Would you be interested to create this PR?