Cns Category
Cmdlets are usually implemented around resource operations. The four basic operations are CREATE, READ, UPDATE and DELETE. This set of operations is known as CRUD. Most of the cmdlets support CRUD which are respectively cmdlets that start with the New/Get/Set/Remove cmdlet verbs but they also may have additional operations
Step 1: Retrieve a object by running a Get command
# Retrieves the vSAN file share which belongs to the $fileServiceDomain file service domain.
Get-CnsVolume -FileServiceDomain $fileServiceDomain
Step 2 : Run commands from the CRUD group
# Creates a Cloud Native Storage (CNS) container cluster with Vanilla as a cluster flavor, 'k8_cls_1' as a cluster ID, Kubernetes as a cluster type, and '[email protected]' as a vSphere user.
New-CnsContainerCluster -ClusterFlavor Vanilla -KubernetesClusterId 'k8_cls_1' -ClusterType Kubernetes -VSphereUser '[email protected]'
# Updates the $cnsVolumeMetadata CNS volume metadata to the $cnsVolume CNS volume.
Set-CnsVolume -CnsVolume $cnsVolume -CnsVolumeMetadata $cnsVolumeMetadata
# Removes the $CnsVolume CNS volume without asking for confirmation.
Remove-CnsVolume -CnsVolume $CnsVolume -Confirm:$false
Step 3: Explore More Related Commands:
New-CnsKubernetesEntityMetadata | This cmdlet creates a Cloud Native Storage (CNS) Kubernetes entity metadata at a client side. |
New-CnsKubernetesEntityReference | This cmdlet creates a Cloud Native Storage (CNS) Kubernetes entity reference at the client side. |
New-CnsVolume | This cmdlet creates a Cloud Native Storage (CNS) volume. |
New-CnsVolumeAttachment | New-CnsVolumeAttachment -CnsVolume <CnsVolume> -VM <VirtualMachine> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>] |
New-CnsVolumeMetadata | This cmdlet creates a Cloud Native Storage (CNS) volume metadata at the client side. |
Remove-CnsVolumeAttachment | Remove-CnsVolumeAttachment -CnsVolume <CnsVolume> -VM <VirtualMachine> [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>] |