Skip to content

Latest commit

 

History

History
65 lines (53 loc) · 3.11 KB

File metadata and controls

65 lines (53 loc) · 3.11 KB

NFS Shared Storage

An optional NFS server can be provisioned to provide shared storage to the Anthos on bare metal cluster. If you follow the standard Quick Starter guide, then the commands required to install the NFS Container Storage Interface (CSI) driver are provided as part of the Terraform output. If you followed one of All in one install or Manual LB install guides then everything is setup automatically.


Sections


Prerequisites


Steps

  1. Follow any of the guides (Quick starter, All in one install or Manual LB install) with one additional variable added to the terraform.tfvars file.

    # terraform.tfvars file
    ...
    nfs_server = true
    ...
  2. The All in one install and Manual LB install guides will automatically setup everything required for the NFS storage class to be available.

    However, for the Quick starter mode installation, you will see some additional steps (in addition to the common ones from the Quick starter), printed out as part of the Terraform output. Run those commands from inside your admin-workstation to install the NFS Driver into your cluster.

    SSH into your admin workstation and ensure that the KUBECONFIG environment variable is set to the path of your Anthos on bare metal cluster context file.

    # example output for the Quick starter installation with 'nfs_server = true'
    
    ################################################################################
    #     Configure the cluster to utilize NFS for PVs with the NFS-CSI driver     #
    ################################################################################
    > export KUBECONFIG=bmctl-workspace/cluster1/cluster1-kubeconfig && \
      curl -skSL https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/v3.1.0/deploy/install-driver.sh | bash -s v3.1.0 -- && \
      kubectl apply -f nfs-csi.yaml
    
    ################################################################################
  3. Verify the availability of the NFS storage classes

    kubectl get storageclass
    # expected output should include
    NAME            PROVISIONER                    RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
    nfs-csi         nfs.csi.k8s.io                 Delete          Immediate              false                  5m
  4. The nfs-csi storage class can now be utilized for your PersistantVolumeClaims.

    # example for a DataVolume
    ...
    spec:
      pvc:
        storageClassName: nfs-csi
    ...

Cleanup