This message was deleted.
# rancher-desktop
a
This message was deleted.
b
AttachVolume.Attach failed for volume "pvc-07efc3d5-a236-4cd6-a7f3-58101c7f9839" : timed out waiting for external-attacher of <http://hostpath.csi.k8s.io|hostpath.csi.k8s.io> CSI driver to attach volume
p
Hmm, don't think we've played with this before; could you describe your set up a little? What OS is this on? I ask because I tried it for a bit, and I seem to at least to be able to get through that: 1. I installed the snapshot-validation-webhook chart 2. Which then lets me install the snapshot-controller chart 3. I then cloned the csi-driver-host-path repo (on my host) and ran
deploy.sh
per instructions in that repo; I followed that document down to checking for the file I created in
/csi-data-dir
in the pod. The first two helm charts are because I found https://github.com/k3s-io/k3s/pull/6459 which says that k3s was going to document that, but I couldn't spot the actual document…
b
Thanks, I can try and follow your steps. My setup is a straightforward default rancher desktop. No customizations to that. Then I deployed external snapshotter which includes instructions for a simple hostpath csi driver
Then I created a storage class like
Copy code
apiVersion: <http://storage.k8s.io/v1|storage.k8s.io/v1>
kind: StorageClass
metadata:
  name: fast
provisioner: <http://hostpath.csi.k8s.io|hostpath.csi.k8s.io>
reclaimPolicy: Delete
volumeBindingMode: Immediate
allowVolumeExpansion: true
I did switch bindingMode from waitForFirstConsumer to Immediate. But neither worked.
As I say, the PVC is created fine, which implies that the driver is installed correctly. Just an issue with the external-attacher. I'm wondering if it's a RBAC thing but can't see anything in the logs
p
Okay, with that I can get (from the pod):
Copy code
Events:
  Type     Reason              Age    From                     Message
  ----     ------              ----   ----                     -------
  Warning  FailedScheduling    3m23s  default-scheduler        0/1 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod..
  Normal   Scheduled           3m22s  default-scheduler        Successfully assigned default/web-0 to desktop-tf26i3i
  Warning  FailedAttachVolume  82s    attachdetach-controller  AttachVolume.Attach failed for volume "pvc-ab193fda-c5e6-4681-b7e2-d0105e97984d" : timed out waiting for external-attacher of <http://hostpath.csi.k8s.io|hostpath.csi.k8s.io> CSI driver to attach volume 1086d863-108f-11ee-b431-ba2fa997ebdf
  Warning  FailedMount         79s    kubelet                  Unable to attach or mount volumes: unmounted volumes=[www], unattached volumes=[kube-api-access-242z2 www]: timed out waiting for the condition
But the PVC looks like it got something:
Copy code
Events:
  Type    Reason                 Age   From                                                                        Message
  ----    ------                 ----  ----                                                                        -------
  Normal  ExternalProvisioning   56s   persistentvolume-controller                                                 waiting for a volume to be created, either by external provisioner "<http://hostpath.csi.k8s.io|hostpath.csi.k8s.io>" or manually created by system administrator
  Normal  Provisioning           56s   hostpath.csi.k8s.io_csi-snapshotter-0_7c4d9356-8aaf-4646-b02e-943f015037dc  External provisioner is provisioning volume for claim "default/www-web-0"
  Normal  ProvisioningSucceeded  55s   hostpath.csi.k8s.io_csi-snapshotter-0_7c4d9356-8aaf-4646-b02e-943f015037dc  Successfully provisioned volume pvc-ab193fda-c5e6-4681-b7e2-d0105e97984d
(And yes, the PV appears to be bound.)
Hmm, this actually sounds like https://github.com/kubernetes-csi/external-snapshotter/issues/438#issuecomment-738915770 which says that… that repo is only a partial example? Not sure if that's still up-to-date, though.
b
Thanks for this, that makes sense now. Its missing some of the plugins. I'll have another play around. Thanks for looking into it for me
Is there a recommended csi driver use with K3s? Most cloud providers now come with a builtin csi driver. So wondered if you had a recommendation?
p
Hmm, for that I think I'd defer to #k3s — they'd be better experts at it I think.
b
Good point, I'll head there.