다음을 통해 공유


Azure Kubernetes Service용 Azure NetApp Files SMB 볼륨 프로비전

Azure Kubernetes Service용 Azure NetApp Files를 구성한 후 Azure Kubernetes Service에 대한 Azure NetApp Files 볼륨을 프로비전할 수 있습니다.

Azure NetApp Files에서는 NFS(NFSv3 또는 NFSv4.1), SMB 및 이중 프로토콜(NFSv3과 SMB 또는 NFSv4.1과 SMB)을 사용하여 볼륨을 만들 수 있습니다.

SMB 볼륨을 사용하는 애플리케이션에 대해 정적으로 구성

이 섹션에서는 Azure NetApp Files에서 SMB 볼륨을 만들고 컨테이너화된 애플리케이션이 사용할 수 있도록 해당 볼륨을 Kubernetes에 정적으로 노출하는 방법을 설명합니다.

SMB 볼륨을 만듭니다.

  1. 나중에 사용할 변수를 정의합니다. myresourcegroup, mylocation, myaccountname, mypool1, premium, myfilepath, myvolsize, myvolnamevirtnetid를 환경에 적절한 값으로 바꿉니다. 파일 경로는 모든 AND 계정 내에서 고유해야 합니다.

    RESOURCE_GROUP="myresourcegroup"
    LOCATION="mylocation"
    ANF_ACCOUNT_NAME="myaccountname"
    POOL_NAME="mypool1"
    SERVICE_LEVEL="premium" # Valid values are standard, premium, and ultra
    UNIQUE_FILE_PATH="myfilepath"
    VOLUME_SIZE_GIB="myvolsize"
    VOLUME_NAME="myvolname"
    VNET_ID="vnetId"
    SUBNET_ID="anfSubnetId"
    
  2. az netappfiles volume create 명령을 사용하여 볼륨을 만듭니다.

    az netappfiles volume create \
        --resource-group $RESOURCE_GROUP \
        --location $LOCATION \
        --account-name $ANF_ACCOUNT_NAME \
        --pool-name $POOL_NAME \
        --name "$VOLUME_NAME" \
        --service-level $SERVICE_LEVEL \
        --vnet $VNET_ID \
        --subnet $SUBNET_ID \
        --usage-threshold $VOLUME_SIZE_GIB \
        --file-path $UNIQUE_FILE_PATH \
        --protocol-types CIFS
    

도메인 자격 증명을 사용하여 비밀 만들기

  1. kubectl create secret 명령을 사용하여 AD(Active Directory) 서버에 액세스할 수 있도록 AKS 클러스터에 비밀을 만듭니다. 이 비밀은 Kubernetes 영구 볼륨에서 Azure NetApp Files SMB 볼륨에 액세스하는 데 사용됩니다. 다음 명령을 사용하여 비밀을 만듭니다. 여기서 USERNAME은 사용자 이름으로, PASSWORD는 비밀로, DOMAIN_NAME은 AD의 도메인 이름으로 바꿉니다.

        kubectl create secret generic smbcreds --from-literal=username=USERNAME --from-literal=password="PASSWORD" --from-literal=domain='DOMAIN_NAME'
    
  2. 비밀이 만들어졌는지 확인합니다.

       kubectl get secret
       NAME       TYPE     DATA   AGE
       smbcreds   Opaque   2      20h
    

SMB CSI 드라이버 설치

Kubernetes SMB PersistentVolume을 만들려면 CSI(Container Storage Interface) 드라이버를 설치해야 합니다.

  1. helm을 사용하여 클러스터에 SMB CSI 드라이버를 설치합니다. windows.enabled 옵션을 true로 설정해야 합니다.

    helm repo add csi-driver-smb https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts   
    helm install csi-driver-smb csi-driver-smb/csi-driver-smb --namespace kube-system --version v1.13.0 --set windows.enabled=true
    

    SMB CSI 드라이버를 설치하는 다른 방법은 Kubernetes 클러스터에 SMB CSI 드라이버 마스터 버전 설치를 참조하세요.

  2. csi-smb 컨트롤러 Pod가 실행 중이고 각 작업자 노드에 kubectl get pods 명령을 사용하여 실행되는 Pod가 있는지 확인합니다.

    kubectl get pods -n kube-system | grep csi-smb
    
    csi-smb-controller-68df7b4758-xf2m9   3/3     Running   0          3m46s
    csi-smb-node-s6clj                    3/3     Running   0          3m47s
    csi-smb-node-win-tfxvk                3/3     Running   0          3m47s
    

영구 볼륨 만들기

  1. az netappfiles volume show를 사용하여 볼륨의 세부 정보를 나열합니다. 이전 단계에서 정의되지 않은 경우 변수를 Azure NetApp Files 계정 및 환경의 적절한 값으로 바꿉니다.

    az netappfiles volume show \
        --resource-group $RESOURCE_GROUP \
        --account-name $ANF_ACCOUNT_NAME \
        --pool-name $POOL_NAME \
        --volume-name "$VOLUME_NAME -o JSON
    

    다음 출력은 실제 값으로 실행된 위 명령의 예입니다.

    {
      ...
      "creationToken": "myvolname",
      ...
      "mountTargets": [
        {
          ...
          "
             "smbServerFqdn": "ANF-1be3.contoso.com",
          ...
        }
      ],
      ...
    }
    
  2. 파일 pv-smb.yaml을 만들고 다음 YAML에 복사합니다. 필요한 경우 myvolname을 이전 단계의 creationToken으로, ANF-1be3.contoso.com\myvolnamesmbServerFqdn 값으로 바꿉니다. 이전 단계에서 만든 비밀이 있는 네임스페이스와 함께 AD 자격 증명 비밀을 포함해야 합니다.

    apiVersion: v1
    kind: PersistentVolume
    metadata:
      name: anf-pv-smb
    spec:
      storageClassName: ""
      capacity:
        storage: 100Gi
      accessModes:
        - ReadWriteMany
      persistentVolumeReclaimPolicy: Retain
      mountOptions:
        - dir_mode=0777
        - file_mode=0777
        - vers=3.0
      csi:
        driver: smb.csi.k8s.io
        readOnly: false
        volumeHandle: myvolname  # make sure it's a unique name in the cluster
        volumeAttributes:
          source: \\ANF-1be3.contoso.com\myvolname
        nodeStageSecretRef:
          name: smbcreds
          namespace: default
    
  3. kubectl apply 명령을 사용하여 영구 볼륨을 만듭니다.

    kubectl apply -f pv-smb.yaml
    
  4. kubectl describe 명령을 사용하여 영구 볼륨의 상태를 kubectl describe할 수 있는지 확인합니다.

    kubectl describe pv pv-smb
    

영구적 볼륨 클레임 만들기

  1. 파일 이름 pvc-smb.yaml을 만들고 다음 YAML에 복사합니다.

    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      name: anf-pvc-smb
    spec:
      accessModes:
        - ReadWriteMany
      volumeName: anf-pv-smb
      storageClassName: ""
      resources:
        requests:
          storage: 100Gi
    
  2. kubectl apply 명령을 사용하여 영구 볼륨 클레임을 만듭니다.

    kubectl apply -f pvc-smb.yaml
    

    kubectl explain 명령을 사용하여 영구 볼륨 클레임 상태가 경계인지 확인합니다.

    kubectl describe pvc pvc-smb
    

Pod를 사용하여 탑재

  1. 파일 iis-smb.yaml을 만들고 다음 YAML에 복사합니다. 이 파일은 경로 /inetpub/wwwroot에 볼륨을 탑재하는 인터넷 정보 서비스 Pod를 만드는 데 사용됩니다.

    apiVersion: v1
    kind: Pod 
    metadata:
      name: iis-pod
      labels:
         app: web
    spec:
      nodeSelector:
        "kubernetes.io/os": windows
      volumes:
      - name: smb
        persistentVolumeClaim:
          claimName: anf-pvc-smb 
      containers:
      - name: web
        image: mcr.microsoft.com/windows/servercore/iis:windowsservercore 
        resources:
          limits:
            cpu: 1
            memory: 800M
        ports:
          - containerPort: 80
        volumeMounts:
        - name: smb
          mountPath: "/inetpub/wwwroot"
          readOnly: false
    
  2. kubectl apply 명령을 사용하여 Pod를 만듭니다.

    kubectl apply -f iis-smb.yaml
    
  3. kubectl explain 명령을 사용하여 Pod가 실행 중이고 /inetpub/wwwroot가 SMB에서 탑재되어 있는지 확인합니다.

    kubectl describe pod iis-pod
    

    명령의 출력은 다음 예제와 유사합니다.

    Name:         iis-pod
    Namespace:    default
    Priority:     0
    Node:         akswin000001/10.225.5.246
    Start Time:   Fri, 05 May 2023 09:34:41 -0400
    Labels:       app=web
    Annotations:  <none>
    Status:       Running
    IP:           10.225.5.248
    IPs:
      IP:  10.225.5.248
    Containers:
      web:
        Container ID:   containerd://39a1659b6a2b6db298df630237b2b7d959d1b1722edc81ce9b1bc7f06237850c
        Image:          mcr.microsoft.com/windows/servercore/iis:windowsservercore
        Image ID:       mcr.microsoft.com/windows/servercore/iis@sha256:0f0114d0f6c6ee569e1494953efdecb76465998df5eba951dc760ac5812c7409
        Port:           80/TCP
        Host Port:      0/TCP
        State:          Running
          Started:      Fri, 05 May 2023 09:34:55 -0400
        Ready:          True
        Restart Count:  0
        Limits:
          cpu:     1
          memory:  800M
        Requests:
          cpu:        1
          memory:     800M
        Environment:  <none>
        Mounts:
          /inetpub/wwwroot from smb (rw)
          /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-mbnv8 (ro)
    ...
    
  4. kubectl exec 명령을 사용하여 Pod에 볼륨이 탑재되었는지 확인한 다음, 올바른 디렉터리에서 dir 명령을 사용하여 볼륨이 탑재되었는지와 해당 크기가 프로비전한 볼륨의 크기와 일치하는지 확인합니다.

    kubectl exec -it iis-pod –- cmd.exe
    

    명령의 출력은 다음 예제와 유사합니다.

    Microsoft Windows [Version 10.0.20348.1668]
    (c) Microsoft Corporation. All rights reserved.
    
    C:\>cd /inetpub/wwwroot
    
    C:\inetpub\wwwroot>dir
     Volume in drive C has no label.
     Volume Serial Number is 86BB-AA55
    
     Directory of C:\inetpub\wwwroot
    
    05/04/2023  08:15 PM    <DIR>          .
    05/04/2023  08:15 PM    <DIR>          ..
               0 File(s)              0 bytes
               2 Dir(s)  107,373,838,336 bytes free
    

SMB 볼륨을 사용하는 애플리케이션에 대해 동적으로 구성

이 섹션에서는 Astra Trident를 사용하여 Azure NetApp Files에서 SMB 볼륨을 동적으로 만들고 이를 컨테이너화된 Windows 애플리케이션에 자동으로 탑재하는 방법을 다룹니다.

Astra Trident 설치

SMB 볼륨을 동적으로 프로비전하려면 Astra Trident 버전 22.10 이상을 설치해야 합니다. SMB 볼륨을 동적으로 프로비전하려면 Windows 작업자 노드가 필요합니다.

Astra Trident는 Kubernetes용으로 특별히 빌드된 NetApp의 동적 스토리지 프로비저닝 프로그램입니다. Astra Trident의 업계 표준 CSI(Container Storage Interface) 드라이버를 사용하여 Kubernetes 애플리케이션에 대한 스토리지 사용을 간소화합니다. Astra Trident에서 Pod로 Kubernetes 클러스터에 배포하고 Kubernetes 워크로드에 대한 동적 스토리지 오케스트레이션 서비스를 제공합니다.

Trident는 Trident 연산자(수동으로 또는 Helm 사용) 또는 tridentctl을 사용하여 설치할 수 있습니다. 이러한 설치 방법 및 작동 방식에 대한 자세한 내용은 설치 가이드를 참조하세요.

Helm을 사용하여 Astra Trident 설치

이 방법을 사용하여 Astra Trident를 설치하려면 워크스테이션에 Helm을 설치해야 합니다. Astra Trident를 설치하는 다른 방법은 Astra Trident 설치 가이드를 참조하세요. 클러스터에 Windows 작업자 노드가 있는 경우 모든 설치 방법으로 Windows를 사용하도록 설정해야 합니다.

  1. Windows 작업자 노드가 있는 클러스터에 대해 Helm을 사용하여 Astra Trident를 설치하려면 다음 명령을 실행합니다.

    helm repo add netapp-trident https://netapp.github.io/trident-helm-chart
    
    helm install trident netapp-trident/trident-operator --version 23.04.0  --create-namespace --namespace trident –-set windows=true
    

    명령의 출력은 다음 예제와 유사합니다.

    NAME: trident
    LAST DEPLOYED: Fri May  5 14:23:05 2023
    NAMESPACE: trident
    STATUS: deployed
    REVISION: 1
    TEST SUITE: None
    NOTES:
    Thank you for installing trident-operator, which will deploy and manage NetApp's Trident CSI
    storage provisioner for Kubernetes.
    
    Your release is named 'trident' and is installed into the 'trident' namespace.
    Please note that there must be only one instance of Trident (and trident-operator) in a Kubernetes cluster.
    
    To configure Trident to manage storage resources, you will need a copy of tridentctl, which is available in pre-packaged Trident releases.  You may find all Trident releases and source code online at https://github.com/NetApp/trident.
    
    To learn more about the release, try:
    
      $ helm status trident
      $ helm get all trident
    
  2. Astra Trident가 성공적으로 설치되어 있는지 확인하려면 다음 kubectl describe 명령을 실행합니다.

    kubectl describe torc trident
    

    명령의 출력은 다음 예제와 유사합니다.

    Name:         trident
    Namespace:    
    Labels:       app.kubernetes.io/managed-by=Helm
    Annotations:  meta.helm.sh/release-name: trident
                  meta.helm.sh/release-namespace: trident
    API Version:  trident.netapp.io/v1
    Kind:         TridentOrchestrator
    Metadata:
        ...
    Spec:
      IPv6:                  false
      Autosupport Image:     docker.io/netapp/trident-autosupport:23.04
      Autosupport Proxy:     <nil>
      Disable Audit Log:     true
      Enable Force Detach:   false
      Http Request Timeout:  90s
      Image Pull Policy:     IfNotPresent
      k8sTimeout:            0
      Kubelet Dir:           <nil>
      Log Format:            text
      Log Layers:            <nil>
      Log Workflows:         <nil>
      Namespace:             trident
      Probe Port:            17546
      Silence Autosupport:   false
      Trident Image:         docker.io/netapp/trident:23.04.0
      Windows:               true
    Status:
      Current Installation Params:
        IPv6:                       false
        Autosupport Hostname:       
        Autosupport Image:          docker.io/netapp/trident-autosupport:23.04
        Autosupport Proxy:          
        Autosupport Serial Number:  
        Debug:                      false
        Disable Audit Log:          true
        Enable Force Detach:        false
        Http Request Timeout:       90s
        Image Pull Policy:          IfNotPresent
        Image Pull Secrets:
        Image Registry:       
        k8sTimeout:           30
        Kubelet Dir:          /var/lib/kubelet
        Log Format:           text
        Log Layers:           
        Log Level:            info
        Log Workflows:        
        Probe Port:           17546
        Silence Autosupport:  false
        Trident Image:        docker.io/netapp/trident:23.04.0
      Message:                Trident installed
      Namespace:              trident
      Status:                 Installed
      Version:                v23.04.0
    Events:
      Type    Reason      Age   From                        Message
      ----    ------      ----  ----                        -------
      Normal  Installing  74s   trident-operator.netapp.io  Installing Trident
      Normal  Installed   46s   trident-operator.netapp.io  Trident installed
    

백 엔드 만들기

Astra Trident에게 Azure NetApp Files 구독 및 볼륨을 만들어야 하는 위치에 대해 지시하려면 백 엔드를 만들어야 합니다. 백 엔드에 대한 자세한 내용은 Azure NetApp Files 백 엔드 구성 옵션 및 예를 참조하세요.

  1. 파일 backend-secret-smb.yaml을 만들고 다음 YAML에 복사합니다. Client IDclientSecret을 사용자 환경에 맞는 올바른 값으로 변경합니다.

    apiVersion: v1
    kind: Secret
    metadata:
      name: backend-tbc-anf-secret
    type: Opaque
    stringData:
      clientID: abcde356-bf8e-fake-c111-abcde35613aa
      clientSecret: rR0rUmWXfNioN1KhtHisiSAnoTherboGuskey6pU
    
  2. 파일 backend-anf-smb.yaml을 만들고 다음 YAML에 복사합니다. ClientID, clientSecret, subscriptionID, tenantID, locationserviceLevel을 사용자 환경에 맞는 올바른 값으로 변경합니다. tenantID, clientIDclientSecret은 Azure NetApp Files 서비스에 대한 충분한 권한이 있는 Microsoft Entra ID의 애플리케이션 등록에서 찾을 수 있습니다. 애플리케이션 등록에는 Azure에서 미리 정의한 소유자 또는 기여자 역할이 포함됩니다. Azure 위치에는 위임된 서브넷이 하나 이상 포함되어야 합니다. serviceLevelAKS 워크로드용 Azure NetApp Files 구성에서 용량 풀에 대해 구성된 serviceLevel과 일치해야 합니다.

    apiVersion: trident.netapp.io/v1
    kind: TridentBackendConfig
    metadata:
      name: backend-tbc-anf-smb
    spec:
      version: 1
      storageDriverName: azure-netapp-files
      subscriptionID: 12abc678-4774-fake-a1b2-a7abcde39312
      tenantID: a7abcde3-edc1-fake-b111-a7abcde356cf
      location: eastus
      serviceLevel: Premium
      credentials:
        name: backend-tbc-anf-secret
      nasType: smb
    
  3. kubectl apply 명령을 사용하여 보안 비밀과 백 엔드를 만듭니다.

    비밀을 만듭니다.

    kubectl apply -f backend-secret.yaml -n trident
    

    명령의 출력은 다음 예제와 유사합니다.

    secret/backend-tbc-anf-secret created
    

    백 엔드를 만듭니다.

    kubectl apply -f backend-anf.yaml -n trident
    

    명령의 출력은 다음 예제와 유사합니다.

    tridentbackendconfig.trident.netapp.io/backend-tbc-anf created
    
  4. 다음 명령을 실행하여 백 엔드가 만들어졌는지 확인합니다.

    kubectl get tridentbackends -n trident
    

    명령의 출력은 다음 예제와 유사합니다.

    NAME        BACKEND               BACKEND UUID
    tbe-9shfq   backend-tbc-anf-smb   09cc2d43-8197-475f-8356-da7707bae203
    

SMB용 도메인 자격 증명으로 비밀 만들기

  1. kubectl create secret 명령을 사용하여 AD 서버에 액세스하기 위해 AKS 클러스터에 비밀을 만듭니다. 이 정보는 Kubernetes 영구 볼륨에서 Azure NetApp Files SMB 볼륨에 액세스하는 데 사용됩니다. 다음 명령을 사용하여 DOMAIN_NAME\USERNAME을 도메인 이름과 사용자 이름으로 바꾸고 PASSWORD를 암호로 바꿉니다.

    kubectl create secret generic smbcreds --from-literal=username=DOMAIN_NAME\USERNAME –from-literal=password="PASSWORD" 
    
  2. 비밀이 만들어졌는지 확인합니다.

    kubectl get secret
    

    출력은 다음 예제와 유사합니다.

    NAME       TYPE     DATA   AGE
    smbcreds   Opaque   2      2h
    

스토리지 클래스 만들기

스토리지 클래스를 사용하여 영구적 볼륨에서 스토리지 단위를 동적으로 생성되는 방법을 정의합니다. Azure NetApp Files 볼륨을 사용하려면 스토리지 클래스를 만들어야 합니다.

  1. 파일 anf-storageclass-smb.yaml을 만들고 다음 YAML에 복사합니다.

    apiVersion: storage.k8s.io/v1
    kind: StorageClass
    metadata:
      name: anf-sc-smb
    provisioner: csi.trident.netapp.io
    allowVolumeExpansion: true
    parameters:
      backendType: "azure-netapp-files"
      trident.netapp.io/nasType: "smb"
      csi.storage.k8s.io/node-stage-secret-name: "smbcreds"
      csi.storage.k8s.io/node-stage-secret-namespace: "default"
    
  2. kubectl apply 명령을 사용하여 스토리지 클래스를 만듭니다.

    kubectl apply -f anf-storageclass-smb.yaml
    

    명령의 출력은 다음 예제와 유사합니다.

    storageclass/anf-sc-smb created
    
  3. 스토리지 클래스의 상태를 보려면 kubectl get 명령을 실행합니다.

    kubectl get sc anf-sc-smb
    NAME         PROVISIONER             RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE
    anf-sc-smb   csi.trident.netapp.io   Delete          Immediate           true                   13s
    

PVC 만들기

PVC(영구적 볼륨 클레임)는 사용자의 스토리지 요청입니다. 영구 볼륨 클레임이 만들어지면 Astra Trident에서 자동으로 Azure NetApp Files SMB 공유를 만들고 Kubernetes 워크로드에서 사용할 수 있도록 합니다.

  1. anf-pvc-smb.yaml이라는 파일을 만들고 다음 YAML을 복사합니다. 이 예에서는 100GiB 볼륨이 ReadWriteMany 액세스 권한으로 만들어지고 스토리지 클래스 만들기에서 만들어진 스토리지 클래스를 사용합니다.

    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
      name: anf-pvc-smb
    spec:
      accessModes:
        - ReadWriteMany
      resources:
        requests:
          storage: 100Gi
      storageClassName: anf-sc-smb
    
  2. kubectl apply 명령을 사용하여 영구 볼륨 클레임을 만듭니다.

    kubectl apply -f anf-pvc-smb.yaml
    

    명령의 출력은 다음 예제와 유사합니다.

    persistentvolumeclaim/anf-pvc-smb created
    
  3. 영구 볼륨 클레임에 대한 정보를 보려면 kubectl get 명령을 실행합니다.

    kubectl get pvc
    

    명령의 출력은 다음 예제와 유사합니다.

    NAME          STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
    anf-pvc-smb   Bound    pvc-209268f5-c175-4a23-b61b-e34faf5b6239   100Gi      RWX            anf-sc-smb     5m38s
    
  4. Astra Trident에서 만들어진 영구 볼륨을 보려면 다음 kubectl get 명령을 실행합니다.

    kubectl get pv
    NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                 STORAGECLASS   REASON   AGE
    pvc-209268f5-c175-4a23-b61b-e34faf5b6239   100Gi      RWX            Delete           Bound    default/anf-pvc-smb   anf-sc-smb              5m52s
    

영구적 볼륨 사용

PVC를 만든 후 Pod를 작동하여 Azure NetApp Files 볼륨에 액세스할 수 있습니다. 다음 매니페스트를 사용하여 이전 단계에서 만든 Azure NetApp Files SMB 공유를 탑재하는 IIS(인터넷 정보 서비스) Pod를 정의할 수 있습니다. 이 예제에서는 볼륨이 /inetpub/wwwroot에 탑재됩니다.

  1. anf-iis-pod.yaml이라는 파일을 만들고 다음 YAML에 복사합니다.

    apiVersion: v1
    kind: Pod 
    metadata:
      name: iis-pod
      labels:
         app: web
    spec:
      nodeSelector:
        "kubernetes.io/os": windows
      volumes:
      - name: smb
        persistentVolumeClaim:
          claimName: anf-pvc-smb 
      containers:
      - name: web
        image: mcr.microsoft.com/windows/servercore/iis:windowsservercore 
        resources:
          limits:
            cpu: 1
            memory: 800M
        ports:
          - containerPort: 80
        volumeMounts:
        - name: smb
          mountPath: "/inetpub/wwwroot"
          readOnly: false
    
  2. kubectl apply 명령을 사용하여 배포를 만듭니다.

    kubectl apply -f anf-iis-deploy-pod.yaml
    

    명령의 출력은 다음 예제와 유사합니다.

    pod/iis-pod created
    

    Pod가 실행 중이고 kubectl describe 명령을 사용하여 SMB를 통해 /inetpub/wwwroot에 탑재되어 있는지 확인합니다.

    kubectl describe pod iis-pod
    

    명령의 출력은 다음 예제와 유사합니다.

    Name:         iis-pod
    Namespace:    default
    Priority:     0
    Node:         akswin000001/10.225.5.246
    Start Time:   Fri, 05 May 2023 15:16:36 -0400
    Labels:       app=web
    Annotations:  <none>
    Status:       Running
    IP:           10.225.5.252
    IPs:
      IP:  10.225.5.252
    Containers:
      web:
        Container ID:   containerd://1e4959f2b49e7ad842b0ec774488a6142ac9152ca380c7ba4d814ae739d5ed3e
        Image:          mcr.microsoft.com/windows/servercore/iis:windowsservercore
        Image ID:       mcr.microsoft.com/windows/servercore/iis@sha256:0f0114d0f6c6ee569e1494953efdecb76465998df5eba951dc760ac5812c7409
        Port:           80/TCP
        Host Port:      0/TCP
        State:          Running
          Started:      Fri, 05 May 2023 15:16:44 -0400
        Ready:          True
        Restart Count:  0
        Limits:
          cpu:     1
          memory:  800M
        Requests:
          cpu:        1
          memory:     800M
        Environment:  <none>
        Mounts:
          /inetpub/wwwroot from smb (rw)
          /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-zznzs (ro)
    
  3. kubectl exec를 사용하여 Pod에 연결하여 볼륨이 Pod에 탑재되어 있는지 확인합니다. 그런 다음 올바른 디렉터리에서 dir 명령을 사용하여 볼륨이 탑재되어 있고 크기가 프로비전한 볼륨의 크기와 일치하는지 확인합니다.

    kubectl exec -it iis-pod –- cmd.exe
    

    명령의 출력은 다음 예제와 유사합니다.

    Microsoft Windows [Version 10.0.20348.1668]
    (c) Microsoft Corporation. All rights reserved.
    
    C:\>cd /inetpub/wwwroot
    
    C:\inetpub\wwwroot>dir
     Volume in drive C has no label.
     Volume Serial Number is 86BB-AA55
    
     Directory of C:\inetpub\wwwroot
    
    05/05/2023  01:38 AM    <DIR>          .
    05/05/2023  01:38 AM    <DIR>          ..
               0 File(s)              0 bytes
               2 Dir(s)  107,373,862,912 bytes free
    
    C:\inetpub\wwwroot>exit
    

다음 단계

Astra Trident는 Azure NetApp Files를 통해 많은 기능을 지원합니다. 자세한 내용은 다음을 참조하세요.