Mapping a single KubeVirt CSI volume snapshot class
You can expose your infrastructure volume snapshot class to the hosted cluster by using KubeVirt CSI.
-
To map your volume snapshot class to the hosted cluster, use the
--infra-volumesnapshot-class-mappingargument 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> \ --infra-volumesnapshot-class-mapping=<infrastructure_volume_snapshot_class>/<hosted_volume_snapshot_class>-
--namespecifies the name of your hosted cluster. -
--node-pool-replicasspecifies the worker count. -
--pull-secretspecifies the path to your pull secret. -
--memoryspecifies a value for memory. -
--coresspecifies a value for CPU. -
--infra-storage-class-mappingspecifies the storage classes. Replace<infrastructure_storage_class>with the storage class in the infrastructure cluster, and replace<hosted_storage_class>with the storage class in the hosted cluster. -
--infra-volumesnapshot-class-mappingspecifies the volume snapshot classes. Replace<infrastructure_volume_snapshot_class>with the volume snapshot class in the infrastructure cluster, and replace<hosted_volume_snapshot_class>with the volume snapshot class in the hosted cluster.If you do not use the
--infra-storage-class-mappingand--infra-volumesnapshot-class-mappingarguments, a hosted cluster is created with the default storage class and the volume snapshot class. Therefore, you must set the default storage class and the volume snapshot class in the infrastructure cluster.
-