Need instruction : To Install ELK stack in On-Prem setup with persistant Volumes using Helm charts

898 views Asked by At

I need help with persistent volumes set while setting up ELK stack to monitor my kubernetes cluster.

I tired

helm install elasticsearch elasticsearch
error : 0/2 nodes are available: 2 pod has unbound immediate PersistentVolumeClaims.

but since i am runnng on prem the persistant voumles are not getting created . How do i specify persistant volumes in the helm install command ?

1

There are 1 answers

0
Howard_Roark On BEST ANSWER

In glancing through the chart, it looks like it is using Persistent Volume Claim Templates in your Statefulset.

The volumeClaimTemplates will provide stable storage using PersistentVolumes provisioned by a PersistentVolume Provisioner.

The chart checks if persistence.labels.enabled is True, and if it is it adds your labels, and then it adds your annotations, and then finally it uses your .Values.volumeClaimTemplate. So, in the end if you don't change anything in the values, it looks like it will try to create persistent volumes with these specs using your default provisioner:

volumeClaimTemplate:
  accessModes: [ "ReadWriteOnce" ]
  resources:
    requests:
      storage: 30Gi

So, you should check what your default provisioner is

kubectl get storageclasses

For example, mine is aws-ebs, and so in my case it would create AWS EBS Volumes. This doc explains how to change your Default storage class if yours isn't set to something you want.

Depending on the installation method, your Kubernetes cluster may be deployed with an existing StorageClass that is marked as default. This default StorageClass is then used to dynamically provision storage for PersistentVolumeClaims that do not require any specific storage class. See PersistentVolumeClaim documentation for details

You also should be able to specify the Storage Class you want to use, and then pass in something like this in a separate values file:

volumeClaimTemplate:
  accessModes: [ "ReadWriteOnce" ]
  storageClassName: "my-storage-class"
  resources:
    requests:
      storage: 30Gi
helm install --name elasticsearch elastic/elasticsearch -f values.yaml -f custom-values.yaml