# Prerequisite Infrastructure

The following components are required prior to setting up the infrastructure needed by e6data. These are commonly present in most cloud environments, but if any are not present, please follow the linked guides below to create them.

1. [Virtual Private Cloud (VPC)](#create-a-vpc-subnets-and-other-vpc-resources)
2. [Google Kubernetes Engine (GKE) cluster](#create-gke-cluster-and-default-node-pool)
   1. [Create GKE Cluster](#create-gke-cluster)

## Create a VPC, Subnets & other VPC Resources

{% hint style="info" %}
Optional, only required if a VPC is not already present to create a GKE Cluster or to install e6data in a new VPC.
{% endhint %}

For custom-mode VPC networks, first create a network and then establish the desired subnets within a region. You are not required to specify subnets for all regions immediately or at all, but you cannot create instances in a region without defined subnets. Lastly, define the firewall rules for your network.

To create a custom-mode VPC network with only IPv4 subnets, follow these steps.

1. In the Google Cloud console, go to the **VPC networks** page. [Go to VPC networks](https://console.cloud.google.com/networking/networks/list)
2. Click **Create VPC network**.
3. Enter a **Name** for the network.
4. Choose **Custom** for the **Subnet creation mode**.
5. In the **New subnet** section, specify the following configuration parameters for a subnet:
   1. Provide a **Name** for the subnet.
   2. Select a **Region**.
   3. Enter an **IP address range**. This is the [primary IPv4 range](https://cloud.google.com/vpc/docs/vpc#vpc_networks_and_subnets) for the subnet.

      If you select a range that is not an RFC 1918 address, confirm that the range doesn't conflict with an existing configuration. For more information, see [IPv4 subnet ranges](https://cloud.google.com/vpc/docs/subnets#manually_created_subnet_ip_ranges).
   4. To define a secondary range for the subnet, click **Create secondary IP range**.

      If you select a range that is not an RFC 1918 address, confirm that the range doesn't conflict with an existing configuration. For more information, see [IPv4 subnet ranges](https://cloud.google.com/vpc/docs/subnets#manually_created_subnet_ip_ranges).
   5. **Private Google Access**: Choose whether to enable [Private Google Access](https://cloud.google.com/vpc/docs/private-access-options) for the subnet when you create it or later by editing it.
   6. **Flow logs**: Choose whether to enable [VPC flow logs](https://cloud.google.com/vpc/docs/using-flow-logs) for the subnet when you create it or later by editing it.
   7. Click **Done**.
6. To add more subnets, click **Add Subnet** and repeat the previous steps. You can also [add more subnets](https://cloud.google.com/vpc/docs/create-modify-vpc-networks#add-subnets) to the network after you have created the network.
7. * In the **Firewall rules** section, you can select **zero or more predefined IPv4 firewall rules** that address common connectivity use cases for instances.\
     [Learn more about firewall rules](https://cloud.google.com/firewall/docs/firewalls)
   * If you **don’t select any predefined rules**, you can still **create your own firewall rules** after the network is created.\
     [How to create your own firewall rules](https://cloud.google.com/firewall/docs/using-firewalls)
   * Each **predefined rule** name starts with the name of the VPC network you're creating (e.g., `NETWORK-...`).
   * In the **IPv4 firewall rules** tab, the **`NETWORK-allow-custom`** ingress rule is **editable**.
   * To modify it, click **Edit** (on the right side of the rule row) to:
     * Select subnets
     * Add additional IPv4 ranges
     * Specify protocols and ports
   * ⚠️ The `NETWORK-allow-custom` rule is **not automatically updated** if you later add more subnets. You must manually update the firewall configuration to include rules for the new subnets.
8. Choose the **Dynamic routing mode** for the VPC network.

   For more information, see [dynamic routing mode](https://cloud.google.com/vpc/docs/vpc#routing_for_hybrid_networks). You can [change the dynamic routing mode](https://cloud.google.com/vpc/docs/create-modify-vpc-networks#switch-dynamic-routing) later.
9. **Maximum transmission unit (MTU)**: Choose whether the network has an MTU of `1460` (default), `1500`, or `8896`. Before setting the MTU to a value higher than `1460`, review [Maximum transmission unit](https://cloud.google.com/vpc/docs/mtu).
10. Click **Create**.

{% hint style="success" %}
Please make note of the ***VPC Region***, it will be required when creating the Workspace in the e6data Console.
{% endhint %}

## Create GKE Cluster & Default Node Pool

{% hint style="info" %}
Optional, only required if a GKE Cluster is not present or to install e6data in a new GKE Cluster.
{% endhint %}

### Create GKE Cluster

To get started with setting up a Google Kubernetes Engine (GKE) cluster along with a default node pool, please follow the comprehensive documentation provided by GCP:&#x20;

[![](https://www.gstatic.com/devrel-devsite/prod/v5ba20c1e081870fd30b7c8ebfa8711369a575956c1f44323664285c05468c6a4/cloud/images/favicons/onecloud/favicon.ico)Creating a regional cluster  |  Google Kubernetes Engine (GKE)  |  Google Cloud](https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-regional-cluster)

For high availability, it is advisable to utilize a regional cluster.

{% hint style="success" %}
Please make note of the ***GKE Cluster Name***, it will be required when creating the Workspace in the e6data Console.
{% endhint %}
