1

I want to using prometheus in EKS on AWS fargate
I follow this.
https://aws.amazon.com/jp/blogs/containers/monitoring-amazon-eks-on-aws-fargate-using-prometheus-and-grafana/
but I can't create persistent volume claims.
this is prometheus-storageclass.yaml.

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: prometheus
  namespace: prometheus
provisioner: kubernetes.io/aws-ebs
parameters:
  type: gp2
reclaimPolicy: Retain
mountOptions:
  debug

Can I Use aws-ebs in provisioner field?

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: prometheus-server
  namespace: prometheus
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 16Gi
  storageClassName: prometheus

I apply sc and pvc

When I apply the PVC, the PVC is still pending and I get the following message

Failed to provision volume with StorageClass "prometheus": error finding candidate zone for pvc: no instances returned

1 Answers1

1

I forgot to create the node group.

eksctl create nodegroup --cluster=myClusterName

  • 1
    One thing you could do now is to leverage the [EKS/Fargate and EFS integration](https://aws.amazon.com/blogs/aws/new-aws-fargate-for-amazon-eks-now-supports-amazon-efs/) to persist the Prometheus metrics. EBS requires you to use EC2 (because EBS is not yet supported by EKS/Fargate) but if you want to have a full Fargate cluster maybe using EFS could be an option. – mreferre Nov 26 '20 at 18:35