1.8 KiB
1.8 KiB
CSI on Windows example
Feature Status: Alpha
CSI on Windows support is an alpha feature since Kubernetes v1.18, refer to Windows-CSI-Support for more details.
Prerequisite
- Install CSI-Proxy on Windows Node
csi-proxy installation is supported with aks-engine v0.48.0.
Install CSI Driver
curl -skSL https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/install-driver.sh | bash -s master,windows --
Deploy a Windows pod with PVC mount
Create StorageClass
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/example/storageclass-azurefile-csi.yaml
Create Windows pod
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/deploy/example/windows/statefulset.yaml
Enter pod container to do validation
$ kubectl exec -it aspnet-azurefile-0 -- cmd
Microsoft Windows [Version 10.0.17763.1098]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\inetpub\wwwroot>cd c:\mnt\azurefile
c:\mnt\azurefile>echo hello > 20200328
c:\mnt\azurefile>dir
Volume in drive C has no label.
Volume Serial Number is DE36-B78A
Directory of c:\mnt\azurefile
03/28/2020 05:48 AM <DIR> .
03/28/2020 05:48 AM <DIR> ..
03/28/2020 05:49 AM 8 20200328
1 File(s) 8 bytes
2 Dir(s) 107,374,116,864 bytes free
In the above example, there is a c:\mnt\azurefile directory mounted as NTFS filesystem.