简体   繁体   中英

When creating a AzureFile persistent volume via a dynamic persistent volume claim the AzureFile created has no metadata

I'm successfully creating persistent volumes dynamically on Azure using the kubernetes.io/azure-file provider. I can configure it to use the storage account I want and I'm generally happy except the resultant objects in Azure (as viewed through the Azure portal or using az cli) have no metadata associated with them.

I'd like to contrast this with the setup I have on AWS using the kubernetes.io/aws-ebs where the EBS volumes get tagged with tags like KubernetesCluster , Name , kubernetes.io/created-for/pv/name and kubernetes.io/created-for/pvc/name .

This info was invaluable when we lost our cluster and had to write a script to re-attach these existing volumes by creating PVs. It's also useful for a host of other reasons.

Is it possible to achieve this behaviour with the kubernetes.io/azure-file ?

The only possible way to meet your requirement is the metadata of the file share. But you need to add the info you want to the metadata yourself.

Metadata for a share or file resource is stored as name-value pairs associated with the resource. Metadata names must adhere to the naming rules for C# identifiers.

在此处输入图片说明

For more details, see Metadata names .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM