Posted in

Kubernetes 1.31: 卷属性类测试版_AI阅读总结 — 包阅AI

包阅导读总结

1.

“`

Kubernetes 1.31、VolumeAttributesClass、Volume Modification、Beta、CSI

“`

2.

Kubernetes 1.31 中 VolumeAttributesClass 用于卷修改将进入 Beta 阶段。它提供了修改卷参数的通用原生 API,通过 CSI 实现,目前作为 Beta 功能仍有一些待完善的方面。

3.

– Kubernetes 1.31 卷相关更新

– 卷的描述属性:包括存储类和容量,存储类不可变,容量可动态更改,但调整其他参数如 IO 服务质量参数困难。

– VolumeAttributesClass 介绍

– 自 1.29 为 Alpha,1.31 为 Beta。

– 是集群范围资源,由管理员创建,可指定特定提供程序的属性。

– 可添加到 PVC 中,且可更改。

– 局限性

– Beta 阶段,最大的是配额支持尚未完善。

– 可查看相关列表获取 CSI 驱动对该功能的支持信息。

思维导图:

文章地址:https://kubernetes.io/blog/2024/08/15/kubernetes-1-31-volume-attributes-class/

文章来源:kubernetes.io

作者:Kubernetes Blog

发布时间:2024/8/15 0:00

语言:英文

总字数:419字

预计阅读时间:2分钟

评分:87分

标签:Kubernetes,卷属性类,CSI,存储,测试版功能


以下为原文内容

本内容来源于用户推荐转载,旨在分享知识与观点,如有侵权请联系删除 联系邮箱 media@ilingban.com

Kubernetes 1.31: VolumeAttributesClass for Volume Modification Beta

By Sunny Song (Google) Matthew Cary (Google) |

Volumes in Kubernetes have been described by two attributes: their storage class, andtheir capacity. The storage class is an immutable property of the volume, while thecapacity can be changed dynamically with volumeresize.

This complicates vertical scaling of workloads with volumes. While cloud providers andstorage vendors often offer volumes which allow specifying IO quality of service(Performance) parameters like IOPS or throughput and tuning them as workloads operate,Kubernetes has no API which allows changing them.

We are pleased to announce that the VolumeAttributesClassKEP,alpha since Kubernetes 1.29, will be beta in 1.31. This provides a generic,Kubernetes-native API for modifying volume parameters like provisioned IO.

Like all new volume features in Kubernetes, this API is implemented via the containerstorage interface (CSI). In addition to theVolumeAttributesClass feature gate, your provisioner-specific CSI driver must support thenew ModifyVolume API which is the CSI side of this feature.

See the fulldocumentationfor all details. Here we show the common workflow.

Dynamically modifying volume attributes.

A VolumeAttributesClass is a cluster-scoped resource that specifies provisioner-specificattributes. These are created by the cluster administrator in the same way as storageclasses. For example, a series of gold, silver and bronze volume attribute classes can becreated for volumes with greater or lessor amounts of provisioned IO.

apiVersion: storage.k8s.io/v1alpha1kind: VolumeAttributesClassmetadata:  name: silverdriverName: your-csi-driverparameters:  provisioned-iops: "500"  provisioned-throughput: "50MiB/s"---apiVersion: storage.k8s.io/v1alpha1kind: VolumeAttributesClassmetadata:  name: golddriverName: your-csi-driverparameters:  provisioned-iops: "10000"  provisioned-throughput: "500MiB/s"

An attribute class is added to a PVC in much the same way as a storage class.

apiVersion: v1kind: PersistentVolumeClaimmetadata:  name: test-pv-claimspec:  storageClassName: any-storage-class  volumeAttributesClassName: silver  accessModes:    - ReadWriteOnce  resources:    requests:      storage: 64Gi

Unlike a storage class, the volume attributes class can be changed:

kubectl patch pvc test-pv-claim -p '{"spec": "volumeAttributesClassName": "gold"}'

Kubernetes will work with the CSI driver to update the attributes of thevolume. The status of the PVC will track the current and desired attributesclass. The PV resource will also be updated with the new volume attributes classwhich will be set to the currently active attributes of the PV.

Limitations with the beta

As a beta feature, there are still some features which are planned for GA but not yetpresent. The largest is quota support, see theKEPand discussion insig-storage for details.

See the Kubernetes CSI driverlist for up-to-dateinformation of support for this feature in CSI drivers.