Setup example linode-blockstorage-csi

I am trying to use the Linode Kubernetes Engine and need a persistent volume claim. I followed the tutorial in https://github.com/linode/linode-blockstorage-csi-driver/blob/master/README.md in order to use a Linode Block Storage Volume as persistent volume claim.

When issueing the command

kubectl apply -f https://raw.githubusercontent.com/linode/linode-blockstorage-csi-driver/master/pkg/linode-bs/deploy/releases/linode-blockstorage-csi-driver-v0.1.3.yaml

i get the following error:

error: unable to recognize "https://raw.githubusercontent.com/linode/linode-blockstorage-csi-driver/master/pkg/linode-bs/deploy/releases/linode-blockstorage-csi-driver-v0.1.3.yaml": no matches for kind "DaemonSet" in version "extensions/v1beta1"

I have the linode kubernetes engine setup with two nodes.

Any hint on how to fix this?

4 Replies

I reached out to our LKE devs for assistance on this.

There are a couple of things they noticed and pointed out:
If you're running LKE, you don't need to deploy the CSI. You can check if this is running, which it should be by default, by running:

kubectl get pods -A

Should you not be on LKE, and you're running v1.16 or later, you'll need to change:

  • the DaemonSet API from extensions/v1beta1 to apps/v1
  • the CRDs to apiextensions/k8s.io/v1

Then, you can run kubectl apply -f thatFile.yaml to deploy the change.

This won't always be the case, as there's a patch to set this by default in an upcoming release.

The other thing they noticed was your setup for Block Storage. You're set up to use Block Storage with your cluster, but based on your error message, you'll need to create a PVC using the linode-block-storage storage Class. Here's an example of what that might look like:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: csi-example-pvc
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
  storageClassName: linode-block-storage

This is located here:
https://github.com/linode/linode-blockstorage-csi-driver/blob/master/pkg/linode-bs/examples/kubernetes/csi-pvc.yaml

There's also an example of using that PVC with a pod:

kind: Pod
apiVersion: v1
metadata:
  name: csi-example-pod
spec:
  containers:
    - name: csi-example-container
      image: busybox
      volumeMounts:
      - mountPath: "/data"
        name: csi-example-volume
      command: [ "sleep", "1000000" ]
  volumes:
    - name: csi-example-volume
      persistentVolumeClaim:
        claimName: csi-example-pvc

https://github.com/linode/linode-blockstorage-csi-driver/blob/master/pkg/linode-bs/examples/kubernetes/csi-app.yaml

At this time, LKE is still in Beta, so there are frequent changes that are being made. We hope to have it released by the end of the first quarter of this year. If you want us to let you know when it reaches general availability, you can fill out this form. If you have any other feedback, we welcome it at feedback@linode.com.

Hi,
I used LKE cluster and have 2 node for running my application and i used block storage. But i known block storage has limited about access mode (RWO). Also it's not work with multiple node so If i want to use access mode (RWX) with block storage it's possible? or must to do other thing?

Thanks.
Kittipak.Y

@okittipak - A Block Storage volume can only be attached to one Linode at a time, and LKE doesn't currently support ReadWriteMany for PVCs. This is mentioned in our Deploying PVCs with the Linode Block Storage CSI Driver guide. A possible workaround would be to use Rook NFS by SSHing into the backend nodes and installing the required packages.

@jyoo You said that LKE doesn't support ReadWriteMany for PVCs. But does it support a kind of "ReadMany" for PVCs ?

I have some config files that I would like to share between linodes ( like certificates to use in a nginx config).

Is there a way to do this with PVC or maybe another methods ( Object storage, etc..)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct