Skip to content

Latest commit

 

History

History
59 lines (48 loc) · 1.88 KB

installation-creating-gcp-vpc.adoc

File metadata and controls

59 lines (48 loc) · 1.88 KB

Creating a VPC in GCP

You must create a VPC in Google Cloud Platform (GCP) for your {product-title} cluster to use. You can customize the VPC to meet your requirements. One way to create the VPC is to modify the provided Deployment Manager template.

Note

If you do not use the provided Deployment Manager template to create your GCP infrastructure, you must review the provided information and manually create the infrastructure. If your cluster does not initialize correctly, you might have to contact Red Hat support with your installation logs.

Prerequisites
  • Configure a GCP account.

  • Generate the Ignition config files for your cluster.

Procedure
  1. Copy the template from the Deployment Manager template for the VPC section of this topic and save it as 01_vpc.py on your computer. This template describes the VPC that your cluster requires.

  2. Create a 01_vpc.yaml resource definition file:

    $ cat <<EOF >01_vpc.yaml
    imports:
    - path: 01_vpc.py
    
    resources:
    - name: cluster-vpc
     type: 01_vpc.py
     properties:
       infra_id: '${INFRA_ID}' (1)
       region: '${REGION}' (2)
    
       master_subnet_cidr: '${MASTER_SUBNET_CIDR}' (3)
       worker_subnet_cidr: '${WORKER_SUBNET_CIDR}' (4)
    EOF
    1. infra_id is the INFRA_ID infrastructure name from the extraction step.

    2. region is the region to deploy the cluster into, for example us-east1.

    3. master_subnet_cidr is the CIDR for the master subnet, for example 10.0.0.0/19.

    4. worker_subnet_cidr is the CIDR for the worker subnet, for example 10.0.32.0/19.

  3. Create the deployment by using the gcloud CLI:

    $ gcloud deployment-manager deployments create ${INFRA_ID}-vpc --config 01_vpc.yaml