Search code examples
kubernetesminio

minio direct-csi no matches for kind "CSIDriver" in version "storage.k8s.io/v1"


I was to setup the 4 node minio cluster in distributed mode using direct-csi driver. Based on the document I try to create the direct-csi deployment, but is failing with below error message. I am using Kubernetes v1.17.0 cluster.

https://github.com/minio/direct-csi

# DIRECT_CSI_DRIVES=data{1...4} DIRECT_CSI_DRIVES_DIR=/mnt kubectl apply -k github.com/minio/direct-csi
namespace/direct-csi unchanged
storageclass.storage.k8s.io/direct.csi.min.io unchanged
serviceaccount/direct-csi-min-io unchanged
clusterrole.rbac.authorization.k8s.io/direct-csi-min-io unchanged
clusterrolebinding.rbac.authorization.k8s.io/direct-csi-min-io unchanged
configmap/direct-csi-config unchanged
secret/direct-csi-min-io unchanged
service/direct-csi-min-io unchanged
deployment.apps/direct-csi-controller-min-io unchanged
daemonset.apps/direct-csi-min-io unchanged
error: unable to recognize "github.com/minio/direct-csi": no matches for kind "CSIDriver" in version "storage.k8s.io/v1"

How to resolve this error message?

[update] to check the CIS version:

kubectl explain CSIDriver
KIND:     CSIDriver
VERSION:  storage.k8s.io/v1beta1

Thanks SR


Solution

  • Since you are using K8s 1.17 the CSIDriver object became GA in 1.18. So storage.k8s.io/v1 will not work. If you look at the docs you can see that you have to use storage.k8s.io/v1beta1 for Beta. So you can fork the repo and make that modification or you can do it locally.

    ✌️