Azure Lustre CSI Driver for kubernetes를 사용하여 AKS에서 Azure Managed Lustre를 사용할 수 있습니다. Kubernetes 컨테이너에서 Azure Managed Lustre 스토리지를 PV로 액세스할 수 있습니다.
AKS Kubernetes 버전 1.21 이상 지원합니다.
kubernetes용 Azure Lustre CSI 드라이버는 현재 AKS 노드 풀에 대한 Ubuntu Linux OS SKU에서만 작동합니다.
AKS 네트워크 모델의 kubenet, CNI에서 지원합니다.
Azure Managed Lustre의 경우 Azure 프라이빗 가상네트워크 내에서 작동합니다.
그러므로, AKS는 Azure Managed Lustre 가상 네트워크에 대한 네트워크 연결이 있어야합니다.
<aside> 💡
주의)
Azure Managed Lustre와 동일한 서브넷에 AKS를 설치하지 않아야합니다.
Azure Managed Lustre를 배포하기 위한 서브넷 CIDR은 다음 문서에서 확인하세요.
</aside>
AKS와 Azure Managed Lustre 네트워크 피어링

Azure Managed Lustre 가상 네트워크의 서브넷에 AKS 설치

Azure Managed Lustre 생성 및 구성
Basic Setting

Storage 용량 기준으로 생성 진행
- 4TiB Lustre 파일 시스템 생성
- 최대 2,000 MB/s 처리량 제공
- 여러 PV로 분할 가능, 여러 Pod가 동시 접근 가능
- 고성능 병렬 처리 지원
Advanced Setting (선택사항)
<aside> 💡
Lustre HSM (Hierarchical Storage Management)
HSM은 Lustre의 고성능 스토리지(OST)와 Azure Blob 같은 저비용 대용량 스토리지(아카이브)를 함께 사용하는 기술입니다. 핵심은 사용자에게는 파일이 항상 Lustre에 있는 것처럼 보이게 하면서, 실제 데이터는 정책에 따라 두 스토리지 계층 간에 자동으로 이동시키는 것입니다.
</aside>
일반적인 워크로드
1. 데이터 준비
├── 원본 데이터셋을 Azure Blob Storage에 업로드
├── 전처리된 데이터도 Blob에 저장
└── 모델, 체크포인트 등도 Blob에 보관
2. 학습 시작 시
├── Azure Managed Lustre 생성
├── 필요한 데이터만 Import (예: 특정 epoch 데이터)
└── 고성능 학습 진행
3. 학습 완료 후
├── 결과 모델을 Blob로 Export
├── 로그, 체크포인트도 Export
└── Lustre 클러스터 삭제 (비용 절약)
Blob Storage 설정 (Advanced Setting 단계에서 Blob을 연결할 경우)
Subscription : MPN-MTC-subscription
Stroage account : terzmyasklustre
container : akslustre
Logging container : logging
Import Prefix (optional) : /

Disk encryption keys setting

Review + create


AKS Cluster 생성 및 구성
az login --use-device-code
CLUSTER=aks-cluster
RESOURCE_GROUP=cyclecloud-rg
LOCATION=koreacentral
VNET=vnet-42dot-01
SNET01=snet-42dot-mg-lustre
SNET02=snet-42dot-aks
VNET_CIDR=10.0.0.0/16
SNET01_CIDR=10.0.1.0/24
SNET02_CIDR=10.0.2.0/24
# 리소스 그룹 생성
az group create --name ${RESOURCE_GROUP} --location ${LOCATION}
# 가상 네트워크 생성
az network vnet create --resource-group ${RESOURCE_GROUP} --name ${VNET} --address-prefixes ${VNET_CIDR} --location ${LOCATION}
# AKS 서브넷 생성
az network vnet subnet create --resource-group $RESOURCE_GROUP --vnet-name $VNET --name $SNET02 --address-prefixes $SNET02_CIDR
# AKS Subnet ID
$SUBNET_ID = az network vnet subnet show --resource-group $RESOURCE_GROUP --vnet-name $VNET --name $SNET02 --query id -o tsv
# AKS Cluster 생성
az aks create --resource-group $RESOURCE_GROUP --name $CLUSTER --vnet-subnet-id $SUBNET_ID --enable-managed-identity --generate-ssh-keys --network-plugin azure --service-cidr 10.1.0.0/16 --dns-service-ip 10.1.0.10 --node-count 1 --node-vm-size Standard_D2s_v3
# AKS 자격증명 다운로드
az aks get-credentials --resource-group cyclecloud-rg --name aks-cluster --overwrite-existing
kubectl 설치
az aks install-cli
Azure Lustre CSI Driver 설치
Azure Lustre CSI Driver를 설치를 진행하게되면 두 개의 csi-azurelustre-controller가 생성됩니다. 두 개의 컨트롤러는 고가용성을 위해서 두 개의 노드에 배포되게됩니다.
그러므로, 필수적으로 두 개 이상의 노드가 필요합니다.
curl -skSL <https://raw.githubusercontent.com/kubernetes-sigs/azurelustre-csi-driver/main/deploy/install-driver.sh> | bash

PV 생성
Azure Lustre CSI 드라이버를 설치하였고 설치된 CSI 드라이버와 yaml 파일을 통해서 Azure Managed Lustre와 연결을 진행하여 PV를 구성하도록 하겠습니다.
yaml 파일에 대한 정보는 portal >> Managed Lustre >> Client connection >> AKS CSI Connections에서 확인이 가능합니다.

storageclass_lustre.yml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
# The name of the StorageClass.
name: sc.azurelustre.csi.azure.com
parameters:
# The file system name of the existing Lustre, "lustrefs" in common case
fs-name: lustrefs
# The IP address of the existing Lustre
mgs-ip-address: 10.0.1.14
provisioner: azurelustre.csi.azure.com
# Azure Lustre Cluster is removed after PVC deletion if reclaimPolicy is the default value "Delete".
reclaimPolicy: Retain
volumeBindingMode: Immediate
mountOptions:
- noatime
- flock
pvc_storageclass_lustre.yml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
# The name of the PVC
name: pvc-lustre
spec:
accessModes:
- ReadWriteMany
resources:
requests:
# The real storage capacity in the claim
storage: 4.0Ti
# This field must be the same as the storage class name in StorageClass
storageClassName: sc.azurelustre.csi.azure.com
yml 파일 실행
kubectl create -f storageclass_lustre.yml
kubectl create -f pvc_storageclass_lustre.yml

드라이버 적상 작동 확인
마운트 파일 export/import