Provision a PVC on the File Storage Service
The Oracle Cloud Infrastructure File Storage service provides a durable, scalable, distributed, enterprise-grade network file system.
Provision PVCs on the File Storage Service (FSS)
Provisioning PVCs on FSS consists of 3 steps:
- Create an FSS instance and a mount target
- Define and create a PV backed by FSS
- Define and create a PVC provisioned by the PV
Configure the VCN and create an FSS
- Choose your deployment scenario:
- Mount target and worker nodes in the same subnet
- Mount target and worker nodes in different subnets
- Mount target and instance use in-transit encryption
- Implement security rules based on your deployment scenario
- Create a FSS instance
Define and create a PV backed by FSS
-
Create a yaml file (
fss-pv.yaml
) to define the PV:apiVersion: v1 kind: PersistentVolume metadata: name: fss-pv spec: capacity: storage: 50Gi volumeMode: Filesystem accessModes: - ReadWriteMany persistentVolumeReclaimPolicy: Retain csi: driver: fss.csi.oraclecloud.com volumeHandle: ocid1.filesystem.oc1.iad.aaaa______j2xw:10.0.0.6:/FileSystem1
-
In the yaml file, set:
driver
value to:fss.csi.oraclecloud.com
volumeHandle
value to:<FileSystemOCID>:<MountTargetIP>:<path>
The
<FileSystemOCID>
is the OCID of the file system defined in the File Storage service, the<MountTargetIP>
is the IP address assigned to the mount target and the<path>
is the mount path to the file system relative to the mount target IP address, starting with a slash. -
Create the PV from the manifest file:
kubectl create -f fss-pv.yaml
Define and create a PVC provisioned by the PV
-
Create a manifest file (
fss-pvc.yaml
) to define the PVC:apiVersion: v1 kind: PersistentVolumeClaim metadata: name: fss-pvc spec: accessModes: - ReadWriteMany storageClassName: "" resources: requests: storage: 50Gi volumeName: fss-pv
-
In the YAML file, set:
storageClassName
to""
volumeName
to the name of the PV created earlier
-
Create the PVC from the manifest file:
kubectl create -f fss-pvc.yaml