Replies: 3 comments 1 reply
|
AWS:
|
|
The equivalents for Azure are listed here - https://learn.microsoft.com/en-us/azure/aks/concepts-storage#storage-classes. The choices are disk (SSD), file share (Azure File Share and EFS are equivalent) and blob storage. For most K8TRE use cases, we would expect storage to be mounted into the container using one of the CSI drivers. The PVCs that any application running as part of K8TRE should request from a finite number of storage classes that we define and not simply from the Below is an example of how we may do this in K8TRE. The application should simply see the mounted PV as a directory with identical filesystem semantics across all platforms. Azure File Sharekind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: k8tre-fileshare
provisioner: file.csi.azure.com
reclaimPolicy: Delete
volumeBindingMode: Immediate
allowVolumeExpansion: true
mountOptions:
- dir_mode=0640
- file_mode=0640
- uid=0
- gid=0
- mfsymlinks
- cache=strict # https://linux.die.net/man/8/mount.cifs
- nosharesock
parameters:
skuName: Standard_LRSAWS EFS and FSxSomething like the below should work. apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: k8tre-fileshare
provisioner: efs.csi.aws.com
reclaimPolicy: Delete
volumeBindingMode: Immediate
allowVolumeExpansion: true
parameters:
provisioningMode: efs-ap
fileSystemId: fs-xxxxxxxx # Replace with actual EFS filesystem IDapiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: k8tre-fileshare
provisioner: fsx.csi.aws.com
reclaimPolicy: Delete
volumeBindingMode: Immediate
allowVolumeExpansion: true
parameters:
subnetId: subnet-xxxx # Required
securityGroupIds: sg-xxxx # Required
deploymentType: SINGLE_AZ_2
storageType: SSDMicroK8sFor on-prem, the default Step 1: Install NFS ServerFirst, install NFS server software on the host: sudo apt-get update
sudo apt-get install nfs-kernel-serverStep 2: Create an NFS Export DirectoryCreate a directory that will be exported via NFS: sudo mkdir -p /srv/nfs/k8s-share
sudo chown nobody:nogroup /srv/nfs/k8s-share
sudo chmod 777 /srv/nfs/k8s-share # Adjust permissions as necessaryStep 3: Configure NFS ExportEdit the sudo nano /etc/exportsAdd the following line: Save and exit the editor. Step 4: Restart NFS ServerRestart the NFS server to apply the changes: sudo exportfs -a
sudo systemctl restart nfs-kernel-serverOptional:Now install the NFS client on all your microk8s nodes: sudo apt install nfs-common -yStep 5: Create StorageClass in MicroK8sNow, create a StorageClass that uses the NFS export. Here is an example apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: k8tre-fileshare
provisioner: microk8s.io/nfs
parameters:
server: <your-server-ip> # Need to sense check if this is required.
path: /srv/nfs/kubedata
reclaimPolicy: Delete
volumeBindingMode: ImmediateAlternative to above would be to use something like Ceph which I have no experience with. ToDo:
mountOptions:
- dir_mode=0777
- file_mode=0777
- uid=1000
- gid=100
- mfsymlinks # Enable support for Minshall+French symlinks
- cache=strict # https://linux.die.net/man/8/mount.cifs
- actimeo=30 # reduce latency for metadata-heavy workload
- nosharesock # reduce probability of reconnect race
|
|
We are using Longhorn in FRIDGE. It should work well across different platforms. It uses NFS to do |
Uh oh!
There was an error while loading. Please reload this page.
K8TRE will assume certain storage requirements can be fulfilled. Where possible these should be encoded in terms of standard Kubernetes abstractions (e.g. supported Access Modes) so that they can be implemented on any K8S cluster. Recommended implementations for the initial example platforms should also be defined.
All reactions