0

I have an EKS cluster for my university project and I want to setup Prometheus on the cluster. To do this I am using helm with the following commands (see this tutorial https://archive.eksworkshop.com/intermediate/240_monitoring/deploy-prometheus/):

kubectl create namespace prometheus

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts

helm install prometheus prometheus-community/prometheus \
    --namespace prometheus \
    --set alertmanager.persistentVolume.storageClass="gp2" \
    --set server.persistentVolume.storageClass="gp2"

When I check the status of the prometheus pods, the alert-manager and server seem to be in an infinite Pending state: enter image description here

When I describe the prometheus-alertmanager-0 pod I see the following VolumeBinding error: enter image description here

When I describe the prometheus-server-5d858bd4bd-6xmws pod I see the following VolumeBinding error: enter image description here

I can also see there are 2 pvcs in Pending state: enter image description here

When I describe the prometheus-server pvc, I can see its waiting for a volume to be created: enter image description here

Im familiar with Kubernetes basics but pvcs is not something that I have used before. Is the solution here to create a "volume" and if so how do I do that?, would that solve the issue?, or am I way off the mark?

Should I try to install Prometheus in a different way?

Any help on this greatly appreciated

Note: Although similar this is not a duplicate of Prometheus server in pending state after installation using Helm. For one the errors highlighted there are different errors, also other manual steps such as creating volumes were also performed (which I have not done), Finally, I am following the specific tutorial referenced and also I am asking if I should try to setup Prometheus a different way if there is a simpler way

bstack
  • 2,466
  • 3
  • 25
  • 38
  • 2
    Yes, it seems that you are missing a persistent volume which is expected by the PVC and further by the pod . For the dynamic provisioning of PVs in your cluster you need either an `EFS-CSI` or `EBS-CSI` controller. Please follow this article for step by step guide [eks-persistent-storage](https://aws.amazon.com/premiumsupport/knowledge-center/eks-persistent-storage/) – ishuar Feb 09 '23 at 01:04

1 Answers1

0
  1. Install the Amazon Elastic Block Store (EBS) Container Storage Interface (CSI) driver onto your Amazon Elastic Kubernetes Service (EKS) cluster. This will enable the creation of Amazon Elastic Compute Cloud (EC2) volumes from within the EKS environment through the utilization of the ebs-csi-driver-controller when Persistent Volume Claims (PVCs) are initiated.

  2. Ensure that the ebs-csi-driver-controller possesses the appropriate AWS Identity and Access Management (IAM) permissions necessary for generating EC2 volumes using an IAM role. To accomplish this, create an IAM role designated as ebs-csi-driver-controller-role. Attach the policy with the ARN arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy to this role.

  3. Subsequently, associate the ebs-csi-driver-controller-role IAM role with the controller. This can be achieved by employing an annotation on the serviceAccount element within the deployment configuration, as demonstrated below:

apiVersion: v1
kind: ServiceAccount
metadata:
  name: <service-account-name>
  annotations:
    eks.amazonaws.com/role-arn: arn:aws:iam::<account-id>:role/ebs-csi-driver-controller-role
snowpeak
  • 797
  • 9
  • 25