cetic / helm-fadi

Helm Chart for FADI
https://github.com/cetic/fadi
Apache License 2.0
13 stars 4 forks source link

[cetic/fadi] pod has unbound PersistentVolumeClaims #15

Closed AyadiAmen closed 4 years ago

AyadiAmen commented 4 years ago

Describe the bug When trying to install FADI in a local Kubernetes cluster, most of the services are stuck in " pending " status

fadi-grafana-8566d6d76d-hvvhn --- 0/1 ---- Pending ---- 0

when I run kubectl describe pod I get a Warning because of a FailedScheduling from default-scheduler that has the message pod has unbound PersistentVolumeClaims

The problem is caused by PersistentVolume, I retested the services after disabling the persistence on those services and they worked fine.

Potential solutions :

  1. Define a default storage-class : https://kubernetes.io/docs/tasks/administer-cluster/change-default-storage-class/
  2. Add the storage-class in the values file of the helm charts of the services that needs the persistent volumes.

Version of Helm and Kubernetes: helm version: "v2.14.3" kubernetes version: 1.15.4

Anything else we need to know:

Stack overflow: https://stackoverflow.com/questions/52668938/pod-has-unbound-persistentvolumeclaims

Persistent Volumes ( official doc ) : https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1

Storage Classes ( potential solution ): https://kubernetes.io/docs/concepts/storage/storage-classes/#local

AyadiAmen commented 4 years ago

Update on the issue

I managed to create a storage-class ( there were none ) following this : https://github.com/rancher/local-path-provisioner .

Then, once the storage class named local-path was created, I set it to default with this command

kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

it solved the problem for all of FADI's services except Postgresql and zookeeper ( zookeeper is one of 4 initContainers for Nifi )

AyadiAmen commented 4 years ago

update

The issue with Postgres and zookeeper was because the storageClass was created in a different namespace then the one we installed fadi in.

You just have to install fadi in the same namespace in which you created the default storage-class.

I'm closing this issue as the bug is solved.