Setup Clients in different VPC to mount using VPC Peering

This article is a step-by-step guide of accessing the Elastifile LB IP from clients which reside on a different VPC or a different project.


Introduction

The Elastifile load balancer is based on GCP routes.

Each route entry represents a single storage node in the Elastifile system.

* Note- Currently, the routes propagation over peered network is a beta feature.


Setup 

In the following example we will use the following environment:

Elastifile Cluster-

Project Name- "canary-support"

VPC Name- "dadee-network"

CIDR- "10.142.0.0/20"


NFS Clients-

Project Name- "support-team-a"

VPC Name- "snir-shared"

CIDR- "10.141.0.0/20"

 

Load Balancer IP- 


Step-by-step instructions

  1. Peering each one of the projects with the other one. 
  2. Validate on each one of the projects that the peering is connected.
  3. Run the following commands in order to allow the beta feature of import/ export routes between VPC networks
  4. # Modify the arguments according to your own environment!! 
    
    # On the Elastifile project, use the export routes flag
    $ gcloud --project=canary-support beta compute networks peerings update peering --network=dadee-network --export-custom-routes
    
    # On the clients project, use the import routes flag
    $ gcloud --project=support-team-a beta compute networks peerings update peering --network=snir-shared --import-custom-routes
    
    


  5. Add the clients' subnet to the 'elastifile-storage-service' FW rule

  6.  Now you can use the load balancer IP for mounting the Elastifile shares in your clients:

    root@client ~]# showmount -e 10.251.255.1
    Export list for 10.251.255.1:
    /first/root             *
    /second/root            *
    /third/root             *


S
Snir is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.