Articles in this section
Category / Section

Steps to Use the Same EFS for Different Clusters or Namespaces in AWS

Published:
Updated:

Steps to Use the Same EFS for Different Clusters or Namespaces in AWS

  1. Connect to an existing EC2 instance or create a new one. Ensure that the security group and VPC are the same for both the fileshare and the EC2 instance.

  2. To create a new instance, select the Launch Instances option as shown below:

    click-launch-instance.png

  3. Provide a name for the instance and specify the key pair name. This will generate a key used to connect to the VM instance using the SSH option.

    key-pair-name.png

  4. In the network settings, select the VPC and security group that match the EFS fileshare as shown below, then launch the instance.

    network-settings.png

  5. Once the instance is created, click the Connect option for that instance.

    connect-instance.png

  6. Copy the SSH command and run it in the command prompt to connect to the VM.

    ssh-command.png

  7. Open the command prompt and navigate to the location where the key was downloaded.

    download-key.png

  8. Once connected to the VM, run the following commands.

        sudo yum -y update
        sudo yum -y install nfs-utils
        OR
        sudo apt update
        sudo apt install nfs-kernel-server
    

    connect-to-vm.png

  9. Create a directory to mount the EFS fileshare in that folder.

    sudo mkdir efsmount
    

    mount-command.png

  10. Go to the EFS fileshare used for the Bold Reports application and click the Attach option.

    click-attach-option.png

  11. Copy the NFS client command and run it in the EC2 instance VM, modifying the directory name to the location where you want to mount.

    copy-nfs-command.png

    Example :

    If you are mounting to the efsmount folder in the EC2 instance VM, adjust the command as shown below:

    sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport fs-0db7f575028fc1023.efs.us-east-1.amazonaws.com:/ efsmount
    
  12. Once the directory is mounted, it acts as a fileshare. Creating a subdirectory in the mounted directory will automatically create the same subfolder in the fileshare. Use the command below to create a subfolder in the mounted directory:

    Command:

    sudo mkdir stagingefs
    

    create-sub-folder.png

  13. Then change the path in the pvclaim_eks.yaml file with the sub directory name as shown below.

    pvclaim-path.png

  14. Next, apply all the YAML files. Once all the pods are in the running state, you will find the configuration files in the subdirectory mounted on the client VM.

    configuration-files.png

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied