create_storage_class
Create a new StorageClass on the cluster. Typed on purpose: the AI assistant may not write a StorageClass through patch_resource or delete_resource, and apply_manifest accepts one only under the same check. provisioner must be a CSI driver installed on the cluster (a CSIDriver of that name, or the provisioner an existing class already uses); the call is refused for an uninstalled provisioner, listing the installed ones. The name must be new: an existing class is never edited or replaced (Kubernetes does not let a class's provisioner, parameters or reclaim policy change in place). The new class is never made the cluster default and this tool cannot move the default. Before the confirmation card the cluster's StorageClasses, CSI drivers, volumes and claims are read live; if they cannot be read the call is refused with a 'Not checked' line, never passed. reclaim_policy Delete (the default) deletes a claim's volume and data with the claim; Retain keeps the volume until someone deletes it. Changing the default class, editing an existing class, or deleting a volume a claim uses stays with a person: the Ankra UI, ankra cluster apply (a manifest in the cluster's stack YAML), ankra cluster patch storageclass ... or ankra cluster delete ..., none of which the AI policy limits. Requires kubernetes.write.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the new StorageClass, a Kubernetes name (lowercase letters, digits, '-' and '.'). Must not exist yet. | |
| cluster_id | Yes | Ankra cluster id (UUID) the call targets. Discover ids with list_clusters. | |
| parameters | No | Driver-specific parameters, string keys to string values (e.g. {"type": "ssd", "fsType": "ext4"}). Numbers are written as strings. | |
| provisioner | Yes | The CSI driver that provisions the class's volumes, exactly as the cluster names it (e.g. csi.hetzner.cloud, driver.longhorn.io, rancher.io/local-path). | |
| reclaim_policy | No | What happens to a volume when its claim is deleted. Defaults to Delete. | |
| volume_binding_mode | No | When a volume is provisioned: at claim time (Immediate, the default) or when the first pod using the claim is scheduled (WaitForFirstConsumer, preferred for zonal disks). | |
| allow_volume_expansion | No | Whether claims of this class may be resized larger later. Only set it when the CSI driver supports expansion. |