jupyterhub / zero-to-jupyterhub-k8s

Helm Chart & Documentation for deploying JupyterHub on Kubernetes
https://zero-to-jupyterhub.readthedocs.io
Other
1.51k stars 789 forks source link

Error from pvc: no volume plugin matched #553

Closed wydwww closed 6 years ago

wydwww commented 6 years ago

Hi all,

I tried to deployed JupyterHub on Kubernetes according to document on my own 2-node cluster.

Kubernetes version

$ kubectl get nodes
NAME               STATUS    ROLES     AGE       VERSION
ip-192-168-2-201   Ready     master    50d       v1.9.2
ip-192-168-2-202   Ready     <none>    50d       v1.9.2

And my config.yaml is:

Contents of config.yaml

singleuser:
  storage:
    dynamic:
      storageClass: local-fast
proxy:
  secretToken: XXXX

At first I met the problem same as https://github.com/jupyterhub/zero-to-jupyterhub-k8s/issues/182#issuecomment-347024506 Because I didn't use any cloud provider, I tried to solve this by add local storage class according to the doc of zero-to-jupyterhub-k8s and doc of k8s storage class. That's how I modified my config.yaml file. I enabled feature gates by adding

Environment="KUBELET_EXTRA_ARGS=--feature-gates=VolumeScheduling=true"
Environment="KUBELET_EXTRA_ARGS=--feature-gates=PersistentLocalVolumes=true"

to /etc/systemd/system/kubelet.service.d/10-kubeadm.conf and daemon-reload and restart kubelet on both of my nodes.

Storage class

$ kubectl describe storageclass
Name:            local-fast
IsDefaultClass:  Yes
Annotations:     storageclass.kubernetes.io/is-default-class=true
Provisioner:     kubernetes.io/no-provisioner
Parameters:      <none>
ReclaimPolicy:   Delete
Events:          <none>

And now the error is:

Error of pvc

$ kubectl --namespace=jupyterhub-class describe pvc
Name:          hub-db-dir
Namespace:     jupyterhub-class
StorageClass:  local-fast
Status:        Pending
Volume:
Labels:        <none>
Annotations:   <none>
Finalizers:    []
Capacity:
Access Modes:
Events:
  Type     Reason              Age               From                         Message
  ----     ------              ----              ----                         -------
  Warning  ProvisioningFailed  1m (x26 over 7m)  persistentvolume-controller  no volume plugin matched

I guess there is something wrong with my local storage setup, can you take a look for me? Thanks!

yuvipanda commented 6 years ago

Thank you for reporting this issue!

This looks like the k8s cluster's dynamic provisioner isn't working? Are you able to get dynamic provisioning working with a simple deployment / pod?

wydwww commented 6 years ago

@yuvipanda Thanks. I did some research about pv, pvc and storage class and solved it now.

I set the default local storage class, and let PV use it, then PVC hub-db-dir will work fine. Repeat this procedure on all worker nodes because local storage class requires VolumeScheduling feature gate to be enabled.

kalaytan commented 5 years ago

Hi Wydwww, are you able to show your solution? Fighting through the same issues after installing with kubeadm.

wydwww commented 5 years ago

@kalaytan As I said above, there was no available PV for this PVC. I manually set the storage to enable PV.

HT-Moh commented 5 years ago

Can you please specify the steps to solve this issue?, thank you in advance

ndjhartman commented 4 years ago

@wydwww shouldn't the Storage Class provision the PVs for the PVC though?

chenbr commented 4 years ago

gp2

On Thu, Feb 27, 2020 at 5:43 PM ndjhartman notifications@github.com wrote:

@wydwww https://github.com/wydwww shouldn't the Storage Class provision the PVs for the PVC though?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jupyterhub/zero-to-jupyterhub-k8s/issues/553?email_source=notifications&email_token=ABFANMQGFKJLTVTEZ2NCQRDRFA6XJA5CNFSM4ETGBEV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENGH4DA#issuecomment-592215564, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFANMTJDJFREKQESMHWF7LRFA6XJANCNFSM4ETGBEVQ .

ndjhartman commented 4 years ago

?

chenbr commented 4 years ago

Sorry. Hit send to fast. And yea it should. But you must have a default class set to something. In the case of aws make it a gp2 class on the aws ebs driver. I’ve got this all setup in ansible if you want to see.

On Thu, Feb 27, 2020 at 6:09 PM ndjhartman notifications@github.com wrote:

?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/jupyterhub/zero-to-jupyterhub-k8s/issues/553?email_source=notifications&email_token=ABFANMSLJPIRLBLMJU6YL63RFBB3TA5CNFSM4ETGBEV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENGKA7I#issuecomment-592224381, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFANMRDGSZNRECXKQ54LULRFBB3TANCNFSM4ETGBEVQ .

ndjhartman commented 4 years ago

Right, I have the aws-ebs storage class as default.

Storage Class:

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: aws-ebs
  annotations:
    storageclass.kubernetes.io/is-default-class: "true"
provisioner: kubernetes.io/aws-ebs
parameters:
  type: gp2
  fsType: ext4

DaemonSet:

  volumeClaimTemplates:
  - metadata:
      name: data
      labels:
        app: elasticsearch
    spec:
      accessModes: [ "ReadWriteOnce" ]
      storageClassName: aws-ebs
      resources:
        requests:
          storage: 1G

And yeah, if you wouldn't mind the ansible setup could be useful to compare.

bhaumiksonii commented 2 years ago

PV use it,

how did u do that?? can u tell how exact u did ??