Dynamic provisioning not working in aws eks for ebs volumes

202 views Asked by At

I am trying to run hlf operator to create a hyperledger network for my project. The issue is that all the pods get stuck due pvc issue. The pvc always remains in pending state. I tried installing csi driver for aws ebs but it doesn't help. These are my yaml files.

CSI Driver :

CSI Driver Output

Storage Class :

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: ebs-sc
provisioner: ebs.csi.aws.com
parameters:
  type: gp2
volumeBindingMode: WaitForFirstConsumer

PVC :

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: ebs-claim
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: ebs-sc
  resources:
    requests:
      storage: 4Gi

Pod:

apiVersion: v1
kind: Pod
metadata:
  name: my-csi-app
spec:
  containers:
    - name: web-server
      image: nginx
      volumeMounts:
        - mountPath: "/usr/share/nginx/html"
          name: my-volume
  volumes:
    - name: my-volume
      persistentVolumeClaim:
        claimName: ebs-claim

Result :

PVC is stuck

The pv doesn't get created .

I would really appreciate some help on this. I've been struggling with this issue for a week now.

0

There are 0 answers