Mapping multiple KubeVirt CSI volume snapshot classes

You can map multiple volume snapshot classes to the hosted cluster by assigning them to a specific group. The infrastructure storage class and the volume snapshot class are compatible with each other only if they belong to a same group.

Procedure
  • To map multiple volume snapshot classes to the hosted cluster, use the group option when creating a hosted cluster, as shown in the following example:

    $ hcp create cluster kubevirt \
      --name my-hosted-cluster \
      --node-pool-replicas 2 \
      --pull-secret /user/name/pullsecret \
      --memory 8Gi \
      --cores 2 \
      --infra-storage-class-mapping=<infrastructure_storage_class>/<hosted_storage_class>,group=<group_name> \
      --infra-storage-class-mapping=<infrastructure_storage_class>/<hosted_storage_class>,group=<group_name> \
      --infra-storage-class-mapping=<infrastructure_storage_class>/<hosted_storage_class>,group=<group_name> \
      --infra-volumesnapshot-class-mapping=<infrastructure_volume_snapshot_class>/<hosted_volume_snapshot_class>,group=<group_name> \
      --infra-volumesnapshot-class-mapping=<infrastructure_volume_snapshot_class>/<hosted_volume_snapshot_class>,group=<group_name>
    • --name specifies the name of your hosted cluster.

    • --node-pool-replicas specifies the worker count.

    • --pull-secret specifies the path to your pull secret.

    • --memory specifies a value for memory.

    • --cores specifies a value for CPU.

    • --infra-storage-class-mapping specifies the storage classes. Replace <infrastructure_storage_class> with the storage class in the infrastructure cluster, <hosted_storage_class> with the storage class in the hosted cluster, and <group_name> with the group name. For example, infra-storage-class-mygroup/hosted-storage-class-mygroup,group=mygroup and infra-storage-class-mymap/hosted-storage-class-mymap,group=mymap.

    • --infra-volumesnapshot-class-mapping specifies the volume snapshot classes. Replace <infrastructure_volume_snapshot_class> with the volume snapshot class in the infrastructure cluster and <hosted_volume_snapshot_class> with the volume snapshot class in the hosted cluster. For example, infra-vol-snap-mygroup/hosted-vol-snap-mygroup,group=mygroup and infra-vol-snap-mymap/hosted-vol-snap-mymap,group=mymap.