Set custom storage capacity and Storage Class for Splunk Enterprise pod volumes.
Customize the storage capacity and Storage Class for Splunk Enterprise pod volumes by modifying the custom resource spec.
- Modify the etcVolumeStorageConfig and varVolumeStorageConfig fields in your custom resource definition to specify the storage class and capacity.
The following example sets the /opt/splunk/etc volume to 15 GiB using the gp2 Storage Class, and the /opt/splunk/var volume to 25 GiB using a custom Storage Class:
apiVersion: enterprise.splunk.com/v4
kind: Standalone
metadata:
name: example
finalizers:
- enterprise.splunk.com/delete-pvc
spec:
etcVolumeStorageConfig:
storageClassName: gp2
storageCapacity: 15Gi
varVolumeStorageConfig:
storageClassName: customStorageClass
storageCapacity: 25Gi
- Verify which Storage Classes are available in your Kubernetes cluster.
Example output:
NAME PROVISIONER AGE
gp2 (default) kubernetes.io/aws-ebs 176d
- Verify the storage allocated to the /opt/splunk/etc and /opt/splunk/var directories on your pod.
Replace <POD_NAME> with your Splunk pod name.
kubectl exec <POD_NAME> -- df -h
Example output showing 15 GiB for /opt/splunk/etc and 25 GiB for /opt/splunk/var:
Filesystem Size Used Avail Use% Mounted on
....
/dev/nvme2n1 25G 530M 24G 3% /opt/splunk/var
/dev/nvme1n1 15G 270M 15G 2% /opt/splunk/etc
....