We will use helm to install Prometheus & Grafana monitoring tools for this chapter. Please review installing helm chapter for instructions if you don’t have it installed.
helm ls
We will use gp2 EBS volumes for simplicity and demonstration purpose. While deploying in Production, you would use io1 volumes with desired IOPS and increase the default storage size in the manifests to get better performance.
Save the below manifest as prometheus-storageclass.yaml using your favorite editor.
You need to update provisioner value that is applicable to AWS EBS provisioner. Please see Kubernetes documentation for help
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: prometheus
namespace: prometheus
provisioner: <EDIT: UPDATE WITH VALUE OF EBS PROVISIONER>
parameters:
type: gp2
reclaimPolicy: Retain
mountOptions:
- debug
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: prometheus
namespace: prometheus
provisioner: kubernetes.io/aws-ebs
parameters:
type: gp2
reclaimPolicy: Retain
mountOptions:
- debug
Create storageclass “prometheus” by applying proper kubectl command
kubectl create -f prometheus-storageclass.yaml