שתף באמצעות


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

--access-modes

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

--allow-volume-expansion

Volume can be expanded or not.

Accepted values: Allow, Disallow
--data-resilience

Allow single data node failure.

Accepted values: DataResilient, NotDataResilient
--failover-speed

Failover speed: NA, Slow, Fast.

Accepted values: Fast, NotAvailable, Slow, Super
--limitations

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

--mount-options

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

--no-wait

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

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

Performance tier.

Accepted values: Basic, Premium, Standard, Ultra, Undefined
--priority

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

--provisioner

Provisioner name.

--type-properties

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

--volume-binding-mode

Binding mode of volumes: Immediate, WaitForFirstConsumer.

Accepted values: Immediate, WaitForFirstConsumer
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

--no-wait

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

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

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

--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.

--next-token

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

--access-modes

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

--allow-volume-expansion

Volume can be expanded or not.

Accepted values: Allow, Disallow
--data-resilience

Allow single data node failure.

Accepted values: DataResilient, NotDataResilient
--failover-speed

Failover speed: NA, Slow, Fast.

Accepted values: Fast, NotAvailable, Slow, Super
--limitations

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

--mount-options

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

--no-wait

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

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

Performance tier.

Accepted values: Basic, Premium, Standard, Ultra, Undefined
--priority

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

--type-properties

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

--created

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

Default value: False
--custom

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

--deleted

Wait until deleted.

Default value: False
--exists

Wait until the resource exists.

Default value: False
--interval

Polling interval in seconds.

Default value: 30
--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.