k8s :AKS with Azure storage
Azure Disk for static:manually create an Azure disk and attach it to a pod in AKS1.create Azure Disk2.mount disk as volumekubectl apply -f azure-disk-pod.yamlkubectl describe pod mypodverify t...
Azure Disk for static:
manually create an Azure disk and attach it to a pod in AKS
1.create Azure Disk
2.mount disk as volume
kubectl apply -f azure-disk-pod.yaml
kubectl describe pod mypod
verify the disk is mounted successfully
Azure Disk for dynamic:
Each AKS cluster includes two pre-created storage classes:
create a persistvolumeclaim
create a pod which uses PVC to mount Azure Disk at /mnt/azure
Azure will auto-provision a disk :
Azure File for dynamic
multiple pods need concurrent access to the same storage volume ,Azure File of SMB protocol is suitable.
create storage:
az storage account create --resource-group MC_aks2019rg_aks2019_eastus --name aks2019af --sku Standard_LRS
create azure-file StorageClass:
To allow the Azure platform to create the required storage resources, create a ClusterRole and ClusterRoleBinding.
create PVC for Azure File:
create PV;
create a pod which uses PVC(azurefile) to mount Azure File at /mnt/azure path
Azure auto-creates Azure File Storge for k8s:
更多推荐
所有评论(0)