I have a Kubernetes cluster comprised of 1 control plane node and 2 worker nodes. The cluster was bootstrapped using kubeadm
.
I am trying to install Prometheus in this cluster using Helm charts as follows:
helm install prometheus prometheus-community/prometheus
However, I am running into the following problem: prometheus-server
and prometheus-alertmanager
pods remain pending.
I followed this tutorial to explictly add volume definitions as follows:
kubectl create -f - <<EOF
kind: PersistentVolume
apiVersion: v1
metadata:
name: pv-prom-server
spec:
storageClassName:
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/pv_prom_server"
---
kind: PersistentVolume
apiVersion: v1
metadata:
name: pv-prom-alertmgr
spec:
storageClassName:
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/pv_prom_altermgr"
EOF
But I end up with the following when I perform kubectl get pv
. pv-prom-server
seems to be bound to prometheus-alertmanager
!
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
pv-prom-alertmgr 5Gi RWO Retain Available 6m11s
pv-prom-server 5Gi RWO Retain Bound default/prometheus-alertmanager 6m11s
prometheus-alertmanager
turns into running
but prometheus-server
remains pending.
Is there a way to solve this issue?
Thanks!