Stefan Walther
Stefan Walther

Reputation: 61

Kasten on GKE: Failed to find any VolumeSnapshotClass in the cluster

I installed via the helm chart kasten on my plain gke (1.26). Created a location and infrastructure profile and provided the service account with the requested storage admin permission. On testing a manual backup on a namespace, the backup job fails on the: Failed to find any VolumeSnapshotClass in the cluster step.

The error report is:

    - cause:
        cause:
          cause:
            cause:
              cause:
                message: "Failed to find any VolumeSnapshotClass in the cluster: <nil>"
              file: kasten.io/k10/kio/exec/phases/backup/snapshot_precheck.go:106
              function: kasten.io/k10/kio/exec/phases/backup.runCSIPrechecks
              linenumber: 106
              message: Failed to get K10 VolumeSnapshotClass
            fields:
              - name: PVC
                value: data-community-postgresql-0
            file: kasten.io/k10/kio/exec/phases/backup/snapshot_precheck.go:88
            function: kasten.io/k10/kio/exec/phases/backup.isCSIPVC
            linenumber: 88
            message: Failed to run CSI prechecks for PVC
          file: kasten.io/k10/kio/exec/phases/backup/snapshot_precheck.go:53
          function: kasten.io/k10/kio/exec/phases/backup.SnapshotPrecheck
          linenumber: 53
          message: Failed to check for CSI PVC
        file: kasten.io/k10/kio/exec/phases/backup/snapshot_data_phase.go:378
        function: kasten.io/k10/kio/exec/phases/backup.processVolumeArtifacts
        linenumber: 378
        message: Failed snapshot precheck for workload
      message: Job failed to be executed

the primer test returns also an error related to the CSI driver

    erviceaccount/k10-primer created
clusterrolebinding.rbac.authorization.k8s.io/k10-primer created
job.batch/k10primer created
Pod k10primer-2952v is in Pending phase
Pod k10primer-2952v is in Pending phase
Pod k10primer-2952v is in Pending phase
Pod k10primer-2952v is in Pending phase
Pod k10primer-2952v is in Pending phase
Pod k10primer-2952v is in Pending phase
Pod k10primer-2952v is in Pending phase
Pod Ready!

Kubernetes Version Check:
  Valid kubernetes version (v1.26.5-gke.1400)  -  OK

RBAC Check:
  Kubernetes RBAC is enabled  -  OK

Aggregated Layer Check:
  The Kubernetes Aggregated Layer is enabled  -  OK

         Found multiple snapshot API group versions, using preferred.
CSI Capabilities Check:
  Using CSI GroupVersion snapshot.storage.k8s.io/v1  -  OK

         Found multiple snapshot API group versions, using preferred.
Validating Provisioners: 
kubernetes.io/gce-pd:
  Storage Classes:
    standard
      Valid Storage Class  -  OK

pd.csi.storage.gke.io:
  Is a CSI Provisioner  -  OK
  CSI Provisioner doesn't have VolumeSnapshotClass  -  Error
  Storage Classes:
    premium-rwo
      Valid Storage Class  -  OK
    standard-rwo
      Valid Storage Class  -  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

Do I need to enable something in my cluster or perform some other steps I missed reading? Thank you in advance Sonic

Upvotes: 0

Views: 729

Answers (2)

Johan Huttenga
Johan Huttenga

Reputation: 13

Just to add a little context here - to use CSI volume snapshots for backup Kasten K10 needs to recognize it, and requires a VolumeSnapshotClass with an annotation. There's a lot more information on how to configure storage integration here - https://docs.kasten.io/latest/install/storage.html

Upvotes: 0

Stefan Walther
Stefan Walther

Reputation: 61

solution is just to create the following:

apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
  name: kasten-snapshotclass
  annotations:
    k10.kasten.io/is-snapshot-class: "true"
driver: pd.csi.storage.gke.io
deletionPolicy: Delete

Upvotes: 0

Related Questions