Share via


az k8s-runtime storage-class

Note

This reference is part of the k8s-runtime extension for the Azure CLI (version 2.57.0 or higher). The extension will automatically install the first time you run an az k8s-runtime storage-class command. Learn more about extensions.

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage storage classes of Arc Kubernetes clusters.

Commands

Name Description Type Status
az k8s-runtime storage-class create

Create a StorageClass.

Extension Preview
az k8s-runtime storage-class delete

Delete a StorageClass.

Extension Preview
az k8s-runtime storage-class disable

Disable storage class service in a connected cluster.

Extension Preview
az k8s-runtime storage-class enable

Enable storage class service in a connected cluster.

Extension Preview
az k8s-runtime storage-class list

List StorageClass resources by parent.

Extension Preview
az k8s-runtime storage-class show

Get a StorageClass.

Extension Preview
az k8s-runtime storage-class update

Update a StorageClass.

Extension Preview
az k8s-runtime storage-class wait

Place the CLI in a waiting state until a condition is met.

Extension Preview

az k8s-runtime storage-class create

Preview

Command group 'k8s-runtime storage-class' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create a StorageClass.

az k8s-runtime storage-class create --resource-uri
                                    --storage-class-name
                                    [--access-modes]
                                    [--allow-volume-expansion {Allow, Disallow}]
                                    [--data-resilience {DataResilient, NotDataResilient}]
                                    [--failover-speed {Fast, NotAvailable, Slow, Super}]
                                    [--limitations]
                                    [--mount-options]
                                    [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                    [--performance {Basic, Premium, Standard, Ultra, Undefined}]
                                    [--priority]
                                    [--provisioner]
                                    [--type-properties]
                                    [--volume-binding-mode {Immediate, WaitForFirstConsumer}]

Examples

Create an RWX storage class on top of managed-csi storage class

az k8s-runtime storage-class create --resource-uri subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1 --storage-class-name rwxsc --type-properties rwx.backing-storage-class-name=managed-csi

Create a Blob storage class

az k8s-runtime storage-class create --resource-uri subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1 --storage-class-name blobsc --type-properties blob.azure-storage-account-key=accountkey blob.azure-storage-account-name=accountname

Required Parameters

--resource-uri

The fully qualified Azure Resource manager identifier of the resource.

--storage-class-name

The name of the the storage class.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--access-modes

The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce] Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--allow-volume-expansion

Volume can be expanded or not.

Property Value
Parameter group: Properties Arguments
Accepted values: Allow, Disallow
--data-resilience

Allow single data node failure.

Property Value
Parameter group: Properties Arguments
Accepted values: DataResilient, NotDataResilient
--failover-speed

Failover speed: NA, Slow, Fast.

Property Value
Parameter group: Properties Arguments
Accepted values: Fast, NotAvailable, Slow, Super
--limitations

Limitations of the storage class Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--mount-options

Additional mount options Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--performance

Performance tier.

Property Value
Parameter group: Properties Arguments
Accepted values: Basic, Premium, Standard, Ultra, Undefined
--priority

Selection priority when multiple storage classes meet the criteria. 0: Highest, -1: Never use.

Property Value
Parameter group: Properties Arguments
--provisioner

Provisioner name.

Property Value
Parameter group: Properties Arguments
--type-properties

Properties of the StorageClass Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--volume-binding-mode

Binding mode of volumes: Immediate, WaitForFirstConsumer.

Property Value
Parameter group: Properties Arguments
Accepted values: Immediate, WaitForFirstConsumer
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az k8s-runtime storage-class delete

Preview

Command group 'k8s-runtime storage-class' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete a StorageClass.

az k8s-runtime storage-class delete --resource-uri
                                    --storage-class-name
                                    [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                    [--yes]

Examples

Delete a storage class

az k8s-runtime storage-class delete --storage-class-name sc1 --resource-uri subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1

Required Parameters

--resource-uri

The fully qualified Azure Resource manager identifier of the resource.

--storage-class-name

The name of the the storage class.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az k8s-runtime storage-class disable

Preview

Command group 'k8s-runtime storage-class' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Disable storage class service in a connected cluster.

az k8s-runtime storage-class disable --resource-uri

Required Parameters

--resource-uri

The resource uri of the connected cluster.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az k8s-runtime storage-class enable

Preview

Command group 'k8s-runtime storage-class' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Enable storage class service in a connected cluster.

az k8s-runtime storage-class enable --resource-uri

Required Parameters

--resource-uri

The resource uri of the connected cluster.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az k8s-runtime storage-class list

Preview

Command group 'k8s-runtime storage-class' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List StorageClass resources by parent.

az k8s-runtime storage-class list --resource-uri
                                  [--max-items]
                                  [--next-token]

Examples

List all storage classes in a cluster

az k8s-runtime storage-class list --resource-uri subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1

Required Parameters

--resource-uri

The fully qualified Azure Resource manager identifier of the resource.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

Property Value
Parameter group: Pagination Arguments
--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Property Value
Parameter group: Pagination Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az k8s-runtime storage-class show

Preview

Command group 'k8s-runtime storage-class' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get a StorageClass.

az k8s-runtime storage-class show --resource-uri
                                  --storage-class-name

Examples

Show a storage class

az k8s-runtime storage-class show --storage-class-name sc1 --resource-uri subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1

Required Parameters

--resource-uri

The fully qualified Azure Resource manager identifier of the resource.

--storage-class-name

The name of the the storage class.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az k8s-runtime storage-class update

Preview

Command group 'k8s-runtime storage-class' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update a StorageClass.

az k8s-runtime storage-class update --resource-uri
                                    --storage-class-name
                                    [--access-modes]
                                    [--allow-volume-expansion {Allow, Disallow}]
                                    [--data-resilience {DataResilient, NotDataResilient}]
                                    [--failover-speed {Fast, NotAvailable, Slow, Super}]
                                    [--limitations]
                                    [--mount-options]
                                    [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                    [--performance {Basic, Premium, Standard, Ultra, Undefined}]
                                    [--priority]
                                    [--type-properties]

Examples

Update the properties of a Blob storage class

az k8s-runtime storage-class update --resource-uri subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1 --storage-class-name blobsc --type-properties azure-storage-account-key=accountkey azure-storage-account-name=accountname

Required Parameters

--resource-uri

The fully qualified Azure Resource manager identifier of the resource.

--storage-class-name

The name of the the storage class.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--access-modes

The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce] Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--allow-volume-expansion

Volume can be expanded or not.

Property Value
Parameter group: Properties Arguments
Accepted values: Allow, Disallow
--data-resilience

Allow single data node failure.

Property Value
Parameter group: Properties Arguments
Accepted values: DataResilient, NotDataResilient
--failover-speed

Failover speed: NA, Slow, Fast.

Property Value
Parameter group: Properties Arguments
Accepted values: Fast, NotAvailable, Slow, Super
--limitations

Limitations of the storage class Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--mount-options

Additional mount options Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--performance

Performance tier.

Property Value
Parameter group: Properties Arguments
Accepted values: Basic, Premium, Standard, Ultra, Undefined
--priority

Selection priority when multiple storage classes meet the criteria. 0: Highest, -1: Never use.

Property Value
Parameter group: Properties Arguments
--type-properties

New storage class type of storageClass Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az k8s-runtime storage-class wait

Preview

Command group 'k8s-runtime storage-class' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Place the CLI in a waiting state until a condition is met.

az k8s-runtime storage-class wait --resource-uri
                                  --storage-class-name
                                  [--created]
                                  [--custom]
                                  [--deleted]
                                  [--exists]
                                  [--interval]
                                  [--timeout]
                                  [--updated]

Required Parameters

--resource-uri

The fully qualified Azure Resource manager identifier of the resource.

--storage-class-name

The name of the the storage class.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

Property Value
Parameter group: Wait Condition Arguments
--deleted

Wait until deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--timeout

Maximum wait in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False