Does Kasten K10 support the NFS CSI driver?
I tried the following but failed to create a snapshot.
Install External Snapshotter
git clone https://github.com/kubernetes-csi/external-snapshotter.git
cd external-snapshotter
kubectl kustomize client/config/crd | kubectl create -f -
kubectl config set-context $(kubectl config current-context) --namespace kube-system
kubectl -n kube-system kustomize deploy/kubernetes/snapshot-controller | kubectl create -f -
cd .. && rm -rf external-snapshotter
Install NFS CSI Driver
helm repo add nfs-csi https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts
helm repo update
helm install nfs-csi nfs-csi/csi-driver-nfs -n kube-system
Create StorageClass
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: nfs
annotations:
storageclass.kubernetes.io/is-default-class: 'true'
provisioner: nfs.csi.k8s.io
parameters:
server: ...
share: /
reclaimPolicy: Delete
volumeBindingMode: Immediate
allowVolumeExpansion: true
mountOptions:
- nfsvers=4.1
Create VolumeSnapshotClass
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
driver: nfs.csi.k8s.io
metadata:
name: nfs
annotations:
k10.kasten.io/is-snapshot-class: "true"
deletionPolicy: Retain
Perform Pre-flight Checks
curl https://docs.kasten.io/tools/k10_primer.sh | bash
Namespace option not provided, using default namespace
Checking for tools
--> Found kubectl
--> Found helm
Checking if the Kasten Helm repo is present
--> The Kasten Helm repo was found
Checking for required Helm version (>= v3.0.0)
--> No Tiller needed with Helm v3.10.3
K10Primer image
--> Using Image (gcr.io/kasten-images/k10tools:5.5.2) to run test
Checking access to the Kubernetes context netapp
--> Able to access the default Kubernetes namespace
K10 Kanister tools image
--> Using Kanister tools image (ghcr.io/kanisterio/kanister-tools:0.85.0) to run test
Running K10Primer Job in cluster with command-
./k10tools primer
serviceaccount/k10-primer created
clusterrolebinding.rbac.authorization.k8s.io/k10-primer created
job.batch/k10primer created
Pod k10primer-kzqhs is in Pending phase
Pod Ready!
nfs.csi.k8s.io:
Is a CSI Provisioner - OK
Storage Classes:
nfs
Valid Storage Class - OK
Volume Snapshot Classes:
nfs
Has k10.kasten.io/is-snapshot-class annotation set to true - OK
Has deletionPolicy 'Retain' - OK
Validate Generic Volume Snapshot:
Pod created successfully - OK
GVS Backup command executed successfully - OK
Pod deleted successfully - OK
serviceaccount "k10-primer" deleted
clusterrolebinding.rbac.authorization.k8s.io "k10-primer" deleted
job.batch "k10primer" deleted
Install Kasten K10
helm repo add kasten https://charts.kasten.io/
helm repo update
kubectl create namespace kasten-io
helm install k10 kasten/k10 --namespace kasten-io
Test K10
curl -s https://docs.kasten.io/tools/k10_primer.sh | bash /dev/stdin -s nfs
Namespace option not provided, using default namespace
Checking for tools
--> Found kubectl
--> Found helm
Checking if the Kasten Helm repo is present
--> The Kasten Helm repo was found
Checking for required Helm version (>= v3.0.0)
--> No Tiller needed with Helm v3.10.3
K10Primer image
--> Using Image (gcr.io/kasten-images/k10tools:5.5.2) to run test
Checking access to the Kubernetes context netapp
--> Able to access the default Kubernetes namespace
K10 Kanister tools image
--> Using Kanister tools image (ghcr.io/kanisterio/kanister-tools:0.85.0) to run test
Running K10Primer Job in cluster with command-
./k10tools primer storage check csi
serviceaccount/k10-primer created
clusterrolebinding.rbac.authorization.k8s.io/k10-primer created
job.batch/k10primer created
Pod k10primer-dcdl6 is in Pending phase
Pod Ready!
Using "K10_PRIMER_CONFIG_YAML" env var content as config source
Using "K10_PRIMER_CONFIG_YAML" env var content as config source
I0113 09:39:31.147157 10 request.go:601] Waited for 1.047576216s due to client-side throttling, not priority and fairness, request: GET:https://10.100.0.1:443/apis/storage.k8s.io/v1beta1
Creating application
-> Created pod (kubestr-csi-original-podllgk9) and pvc (kubestr-csi-original-pvcwqvgr)
Taking a snapshot
Cleaning up resources
CSI Snapshot Walkthrough:
Using annotated VolumeSnapshotClass (nfs)
Failed to create Snapshot: CSI Driver failed to create snapshot for PVC (kubestr-csi-original-pvcwqvgr) in Namespace (default): Context done while polling: context deadline exceeded - Error
Error: {"message":"Failed to create Snapshot: CSI Driver failed to create snapshot for PVC (kubestr-csi-original-pvcwqvgr) in Namespace (default): Context done while polling: context deadline exceeded","function":"kasten.io/k10/kio/tools/k10primer.(*TestRetVal).Errors","linenumber":180,"file":"kasten.io/k10/kio/tools/k10primer/k10primer.go:180"}
serviceaccount "k10-primer" deleted
clusterrolebinding.rbac.authorization.k8s.io "k10-primer" deleted
job.batch "k10primer" deleted