---
title: Installing a cluster on Google Cloud in a disconnected environment
---

# Installing a cluster on Google Cloud in a disconnected environment {#installing-restricted-networks-gcp-installer-provisioned}

In OpenShift Container Platform 4.22, you can install a cluster on Google Cloud in a restricted network by creating an internal mirror of the installation release content on an existing Google Virtual Private Cloud (VPC).

> [!IMPORTANT]
> You can install an OpenShift Container Platform cluster by using mirrored installation release content, but your cluster will require internet access to use the Google Cloud APIs.

## Prerequisites {#prerequisites_installing-restricted-networks-gcp-installer-provisioned}

- You reviewed details about the OpenShift Container Platform installation and update processes. For more information, see "Installation and update".
- You read the documentation on selecting a cluster installation method and preparing it for users. For more information, see "Selecting a cluster installation method and preparing it for users".
- You configured a Google Cloud project to host the cluster. For more information, see "Configuring a Google Cloud project".
- You mirrored the images for a disconnected installation to your registry and obtained the `imageContentSources` data for your version of OpenShift Container Platform. For more information, see "Mirroring images for a disconnected installation".

  > [!IMPORTANT]
  > Because the installation media is on the mirror host, you can use that computer to complete all installation steps.
- You have an existing VPC in Google Cloud. When you install a cluster in a restricted network by using installer-provisioned infrastructure, you cannot use the VPC that the installation program creates. You must use a user-provisioned VPC that satisfies one of the following requirements:

  - Contains the mirror registry
  - Has firewall rules or a peering connection to access the mirror registry hosted elsewhere
- If you use a firewall, you configured it to allow the sites that your cluster requires access to. You might need to grant access to more sites, but you must grant access to `*.googleapis.com` and `accounts.google.com`. For more information, see "Configuring your firewall for OpenShift Container Platform".
- If you are installing by using a Private Service Connect (PSC) endpoint, you must configure the endpoint in the same VPC where you install the cluster, as specified in the `install-config.yaml` file. For more information, see "Installing a cluster on Google Cloud into an existing VPC".

**Additional resources**
{._additional-resources}

- [Installation and update](/openshift-docs-markdown/architecture/architecture-installation#architecture-installation)
- [Selecting a cluster installation method and preparing it for users](/openshift-docs-markdown/installing/overview/installing-preparing#installing-preparing)
- [Configuring a Google Cloud project](/openshift-docs-markdown/installing/installing_gcp/installing-gcp-account#installing-gcp-account)
- [Mirroring images for a disconnected installation](/openshift-docs-markdown/disconnected/installing-mirroring-installation-images#installing-mirroring-installation-images)
- [Configuring your firewall for OpenShift Container Platform](/openshift-docs-markdown/installing/install_config/configuring-firewall#configuring-firewall-module_configuring-firewall)
- [Private Service Connect](https://cloud.google.com/vpc/docs/private-service-connect)
- [Installing a cluster on Google Cloud into an existing VPC](/openshift-docs-markdown/installing/installing_gcp/installing-gcp-vpc#installing-gcp-vpc)

## About installations in restricted networks {#installation-about-restricted-networks_installing-restricted-networks-gcp-installer-provisioned}

You can install OpenShift Container Platform 4.22 in a restricted network without an active internet connection to obtain software components. Restricted network installations can use installer-provisioned or user-provisioned infrastructure, depending on the cloud platform to which you are installing the cluster.

If you choose to perform a restricted network installation on a cloud platform, you still require access to its cloud APIs. Some cloud functions, such as Amazon Web Service’s Route 53 DNS and IAM services, require internet access. Depending on your network, you might require less internet access for an installation on bare-metal hardware, Nutanix, or on VMware vSphere.

To complete a restricted network installation, you must create a registry that mirrors the contents of the OpenShift image registry and contains the installation media. You can create this registry on a mirror host, which can access both the internet and your closed network, or by using other methods that meet your restrictions.

### Additional limits {#installation-restricted-network-limits_installing-restricted-networks-gcp-installer-provisioned}

Clusters in restricted networks have the following additional limitations and restrictions:

- The `ClusterVersion` status includes an `Unable to retrieve available updates` error.
- By default, you cannot use the contents of the Developer Catalog because you cannot access the required image stream tags.

## Internet access for OpenShift Container Platform {#cluster-entitlements_installing-restricted-networks-gcp-installer-provisioned}

In OpenShift Container Platform 4.22, you require access to the internet to obtain the images that are necessary to install your cluster.

You must have internet access to perform the following actions:

- Access Red Hat Hybrid Cloud Console to download the installation program and perform subscription management. If the cluster has internet access and you do not disable Telemetry, that service automatically entitles your cluster.
- Access Quay.io to obtain the packages that are required to install your cluster.
- Obtain the packages that are required to perform cluster updates.

## Generating a key pair for cluster node SSH access {#ssh-agent-using_installing-restricted-networks-gcp-installer-provisioned}

During an OpenShift Container Platform installation, you can provide an SSH public key to the installation program. The key is passed to the Red Hat Enterprise Linux CoreOS (RHCOS) nodes through their Ignition config files and is used to authenticate SSH access to the nodes. The key is added to the `~/.ssh/authorized_keys` list for the `core` user on each node, which enables password-less authentication.

The key is added to the `~/.ssh/authorized_keys` list for the `core` user on each node, which enables password-less authentication. After the key is passed to the nodes, you can use the key pair to SSH in to the RHCOS nodes as the user `core`. To access the nodes through SSH, the private key identity must be managed by SSH for your local user.

If you want to SSH in to your cluster nodes to perform installation debugging or disaster recovery, you must provide the SSH public key during the installation process. The `./openshift-install gather` command also requires the SSH public key to be in place on the cluster nodes.

> [!IMPORTANT]
> Do not skip this procedure in production environments, where disaster recovery and debugging is required.

> [!NOTE]
> You must use a local key, not one that you configured with platform-specific approaches.

**Procedure**

1. If you do not have an existing SSH key pair on your local machine to use for authentication onto your cluster nodes, create one. For example, on a computer that uses a Linux operating system, run the following command:

   ```terminal
   $ ssh-keygen -t ed25519 -N '' -f <path>/<file_name>
   ```

   Specifies the path and file name, such as `~/.ssh/id_ed25519`, of the new SSH key. If you have an existing key pair, ensure your public key is in the your `~/.ssh` directory.

   > [!NOTE]
   > If you plan to install an OpenShift Container Platform cluster that uses the RHEL cryptographic libraries that have been submitted to NIST for FIPS 140-2/140-3 Validation on only the `x86_64`, `ppc64le`, and `s390x` architectures, do not create a key that uses the `ed25519` algorithm. Instead, create a key that uses the `rsa` or `ecdsa` algorithm.
2. View the public SSH key:

   ```terminal
   $ cat <path>/<file_name>.pub
   ```

   For example, run the following to view the `~/.ssh/id_ed25519.pub` public key:

   ```terminal
   $ cat ~/.ssh/id_ed25519.pub
   ```
3. Add the SSH private key identity to the SSH agent for your local user, if it has not already been added. SSH agent management of the key is required for password-less SSH authentication onto your cluster nodes, or if you want to use the `./openshift-install gather` command.

   > [!NOTE]
   > On some distributions, default SSH private key identities such as `~/.ssh/id_rsa` and `~/.ssh/id_dsa` are managed automatically.

   1. If the `ssh-agent` process is not already running for your local user, start it as a background task:

      ```terminal
      $ eval "$(ssh-agent -s)"
      ```

      ```terminal {title="Example output"}
      Agent pid 31874
      ```

      > [!NOTE]
      > If your cluster is in FIPS mode, only use FIPS-compliant algorithms to generate the SSH key. The key must be either RSA or ECDSA.
4. Add your SSH private key to the `ssh-agent`:

   ```terminal
   $ ssh-add <path>/<file_name>
   ```

   Specify the path and file name for your SSH private key, such as `~/.ssh/id_ed25519`.

   ```terminal {title="Example output"}
   Identity added: /home/<you>/<path>/<file_name> (<computer_name>)
   ```

**Next steps**

- When you install OpenShift Container Platform, provide the SSH public key to the installation program.

## Creating the installation configuration file {#installation-initializing_installing-restricted-networks-gcp-installer-provisioned}

You can customize the OpenShift Container Platform cluster you install on Google Cloud.

**Prerequisites**

- You have the OpenShift Container Platform installation program and the pull secret for your cluster. For a restricted network installation, these files are on your mirror host.
- You have the `imageContentSources` values that were generated during mirror registry creation.
- You have obtained the contents of the certificate for your mirror registry.
- Configure a Google Cloud account.

**Procedure**

1. Create the `install-config.yaml` file.

   1. Change to the directory that contains the installation program and run the following command:

      ```terminal
      $ ./openshift-install create install-config --dir <installation_directory>
      ```

      - `<installation_directory>`: For `<installation_directory>`, specify the directory name to store the files that the installation program creates.

        When specifying the directory:
      - Verify that the directory has the `execute` permission. This permission is required to run Terraform binaries under the installation directory.
      - Use an empty directory. Some installation assets, such as bootstrap X.509 certificates, have short expiration intervals, therefore you must not reuse an installation directory. If you want to reuse individual files from another cluster installation, you can copy them into your directory. However, the file names for the installation assets might change between releases. Use caution when copying installation files from an earlier OpenShift Container Platform version.
   2. At the prompts, provide the configuration details for your cloud:

      1. Optional: Select an SSH key to use to access your cluster machines.

         > [!NOTE]
         > For production OpenShift Container Platform clusters on which you want to perform installation debugging or disaster recovery, specify an SSH key that your `ssh-agent` process uses.
      2. Select **gcp** as the platform to target.
      3. If you have not configured the service account key for your Google Cloud account on your computer, you must obtain it from Google Cloud and paste the contents of the file or enter the absolute path to the file.
      4. Select the project ID to provision the cluster in. The default value is specified by the service account that you configured.
      5. Select the region to deploy the cluster to.
      6. Select the base domain to deploy the cluster to. The base domain corresponds to the public DNS zone that you created for your cluster.
      7. Enter a descriptive name for your cluster.
2. Edit the `install-config.yaml` file to give the additional information that is required for an installation in a restricted network.

   1. Update the `pullSecret` value to contain the authentication information for your registry:

      ```yaml
      pullSecret: '{"auths":{"<mirror_host_name>:5000": {"auth": "<credentials>","email": "you@example.com"}}}'
      ```

      For `<mirror_host_name>`, specify the registry domain name that you specified in the certificate for your mirror registry, and for `<credentials>`, specify the base64-encoded user name and password for your mirror registry.
   2. Add the `additionalTrustBundle` parameter and value.

      ```yaml
      additionalTrustBundle: |
        -----BEGIN CERTIFICATE-----
        ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
        -----END CERTIFICATE-----
      ```

      The value must be the contents of the certificate file that you used for your mirror registry. The certificate file can be an existing, trusted certificate authority, or the self-signed certificate that you generated for the mirror registry.
   3. Define the network and subnets for the VPC to install the cluster in under the parent `platform.gcp` field:

      ```yaml
      platform:
        gcp:
          network: <existing_vpc>
          controlPlaneSubnet: <control_plane_subnet>
          computeSubnet: <compute_subnet>
      ```

      For `platform.gcp.network`, specify the name for the existing Google VPC. For `platform.gcp.controlPlaneSubnet` and `platform.gcp.computeSubnet`, specify the existing subnets to deploy the control plane machines and compute machines, respectively.
   4. Add the image content resources, which resemble the following YAML excerpt:

      ```yaml
      imageContentSources:
      - mirrors:
        - <mirror_host_name>:5000/<repo_name>/release
        source: quay.io/openshift-release-dev/ocp-release
      - mirrors:
        - <mirror_host_name>:5000/<repo_name>/release
        source: registry.redhat.io/ocp/release
      ```

      For these values, use the `imageContentSources` that you recorded during mirror registry creation.
   5. Optionally, set the publishing strategy to `Internal`:

      ```yaml
      publish: Internal
      ```

      By setting this option, you create an internal Ingress Controller and a private load balancer.
3. Make any other modifications to the `install-config.yaml` file that you require.

   For more information about the parameters, see "Installation configuration parameters".
4. Back up the `install-config.yaml` file so that you can use it to install multiple clusters.

   > [!IMPORTANT]
   > The `install-config.yaml` file is consumed during the installation process. If you want to reuse the file, you must back it up now.

**Additional resources**
{._additional-resources}

- [Installation configuration parameters for Google Cloud](/openshift-docs-markdown/installing/installing_gcp/installation-config-parameters-gcp#installation-config-parameters-gcp)

### Minimum resource requirements for cluster installation {#installation-minimum-resource-requirements_installing-restricted-networks-gcp-installer-provisioned}

To ensure that your OpenShift Container Platform cluster runs as expected, each cluster machine must meet minimum CPU, memory, and storage requirements.

**Minimum resource requirements**

<table>
<thead>
<tr>
  <th>Machine</th>
  <th>Operating system</th>
  <th>vCPU</th>
  <th>Virtual RAM</th>
  <th>Storage</th>
  <th>Input/Output Per Second (IOPS)</th>
</tr>
</thead>
<tbody>
<tr>
  <td>Bootstrap</td>
  <td>RHCOS</td>
  <td>4</td>
  <td>16 GB</td>
  <td>100 GB</td>
  <td>300</td>
</tr>
<tr>
  <td>Control plane</td>
  <td>RHCOS</td>
  <td>4</td>
  <td>16 GB</td>
  <td>100 GB</td>
  <td>300</td>
</tr>
<tr>
  <td>Compute</td>
  <td>RHCOS</td>
  <td>2</td>
  <td>8 GB</td>
  <td>100 GB</td>
  <td>300</td>
</tr>
</tbody>
</table>

- One vCPU is equal to one physical core when simultaneous multithreading (SMT), or Hyper-Threading, is not enabled. When enabled, use the following formula to calculate the corresponding ratio: (threads per core × cores) × sockets = vCPUs.
- OpenShift Container Platform and Kubernetes are sensitive to disk performance, and Red Hat recommends faster storage, particularly for etcd on the control plane nodes which require a 10 ms p99 fsync duration. On many cloud platforms, storage size and IOPS scale together, so you might need to provision more storage to get enough performance.
- As with all user-provisioned installations, if you choose to use RHEL compute machines in your cluster, you take responsibility for all operating system life cycle management and maintenance, including performing system updates, applying patches, and completing all other required tasks. OpenShift Container Platform 4.10 and later do not support RHEL 7 compute machines.

> [!NOTE]
> In OpenShift Container Platform version 4.22, RHCOS uses RHEL version 9.8, which updates the micro-architecture requirements. Each architecture requires the following minimum instruction set architectures (ISA):
>
> - x86-64 architecture requires x86-64-v2 ISA
> - ARM64 architecture requires ARMv8.0-A ISA
> - ppc64le architecture requires IBM(R) Power9 ISA
> - s390x architecture requires IBM(R) z14 ISA
>
> For more information, see [Architectures](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html-single/9.8_release_notes/index#architectures) in the RHEL documentation.

If an instance type for your platform meets the minimum requirements for cluster machines, it is supported to use in OpenShift Container Platform.

**Additional resources**
{._additional-resources}

- [Optimizing storage](/openshift-docs-markdown/scalability_and_performance/optimization/optimizing-storage#optimizing-storage)

### Tested instance types for Google Cloud {#installation-gcp-tested-machine-types_installing-restricted-networks-gcp-installer-provisioned}

OpenShift Container Platform supports specific Google Cloud instance types that have been validated for cluster deployment.

> [!NOTE]
> Not all instance types are available in all regions and zones. For a detailed breakdown of which instance types are available in which zones, see [regions and zones](https://cloud.google.com/compute/docs/regions-zones#available) (Google documentation).
>
> Some instance types require the use of Hyperdisk storage. If you use an instance type that requires Hyperdisk storage, all of the nodes in your cluster must support Hyperdisk storage, and you must change the default storage class to use Hyperdisk storage. For more information, see [machine series support for Hyperdisk](https://cloud.google.com/compute/docs/disks/hyperdisks#machine-type-support) (Google documentation). For instructions on modifying storage classes, see the "GCE PersistentDisk (gcePD) object definition" section in the Dynamic Provisioning page in *Storage*.

See the following machine series:

- `A2`
- `A3`
- `C2`
- `C2D`
- `C3`
- `C3D`
- `C4`
- `E2`
- `M1`
- `N1`
- `N2`
- `N2D`
- `N4`
- `Tau T2D`

### Tested instance types for Google Cloud on 64-bit ARM infrastructures {#installation-gcp-tested-machine-types-arm_installing-restricted-networks-gcp-installer-provisioned}

OpenShift Container Platform supports specific Google Cloud 64-bit ARM instance types that have been validated for cluster deployment.

See the following machine series for 64-bit ARM machines:

- `C4A`
- `N4A`
- `Tau T2A`

### Using custom machine types {#installation-custom-machine-types_installing-restricted-networks-gcp-installer-provisioned}

If the predefined Google Cloud machine types do not meet your workload requirements, you can configure a custom machine type in the `install-config.yaml` file during OpenShift Container Platform installation.

Consider the following when using a custom machine type:

- Similar to predefined instance types, custom machine types must meet the minimum resource requirements for control plane and compute machines. For more information, see "Minimum resource requirements for cluster installation".
- The name of the custom machine type must adhere to the following syntax: `custom-<number_of_cpus>-<amount_of_memory_in_mb>`

  For example, `custom-6-20480`.

As part of the installation process, you specify the custom machine type in the `install-config.yaml` file.

```yaml {title="Sample install-config.yaml file with a custom machine type"}
compute:
- architecture: amd64
  hyperthreading: Enabled
  name: worker
  platform:
    gcp:
      type: custom-6-20480
  replicas: 2
controlPlane:
  architecture: amd64
  hyperthreading: Enabled
  name: master
  platform:
    gcp:
      type: custom-6-20480
  replicas: 3
```

### Enabling Shielded VMs {#installation-gcp-enabling-shielded-vms_installing-restricted-networks-gcp-installer-provisioned}

You can use Shielded VMs when installing your OpenShift Container Platform cluster. Shielded VMs have extra security features including secure boot, firmware and integrity monitoring, and rootkit detection.

For more information, see Google’s documentation on [Shielded VMs](https://cloud.google.com/shielded-vm).

> [!NOTE]
> Shielded VMs are currently not supported on clusters with 64-bit ARM infrastructures.

**Procedure**

- Use a text editor to edit the `install-config.yaml` file before deploying your cluster and add one of the following stanzas:

  1. To use shielded VMs for only control plane machines:

     ```yaml
     controlPlane:
       platform:
         gcp:
            secureBoot: Enabled
     ```
  2. To use shielded VMs for only compute machines:

     ```yaml
     compute:
     - platform:
         gcp:
            secureBoot: Enabled
     ```
  3. To use shielded VMs for all machines:

     ```yaml
     platform:
       gcp:
         defaultMachinePlatform:
            secureBoot: Enabled
     ```

### Enabling Confidential VMs {#installation-gcp-enabling-confidential-vms_installing-restricted-networks-gcp-installer-provisioned}

You can use Confidential VMs when installing your OpenShift Container Platform cluster. Confidential VMs encrypt data during processing.

For more information, see Google’s documentation on [Confidential Computing](https://cloud.google.com/confidential-computing). You can enable Confidential VMs and Shielded VMs at the same time, although they are not dependent on each other.

> [!NOTE]
> Confidential VMs are currently not supported on 64-bit ARM architectures.

**Procedure**

- Use a text editor to edit the `install-config.yaml` file before deploying your cluster and add one of the following stanzas:

  1. To use confidential VMs for only control plane machines:

     ```yaml
     controlPlane:
       platform:
         gcp:
            confidentialCompute: AMDEncryptedVirtualizationNestedPaging
            type: n2d-standard-8
            onHostMaintenance: Terminate
     ```

     where:

     `confidentialCompute`
     :   Enables confidential VMs with AMD Secure Encrypted Virtualization Secure Nested Paging (AMD SEV-SNP). For more information about available options, see "Additional Google Cloud configuration parameters".

     `type`
     :   Specifies a machine type that supports Confidential VMs. Confidential VMs require the N2D, C2D, C3D, or C3 series of machine types. For more information on supported machine types, see [Supported operating systems and machine types](https://cloud.google.com/compute/confidential-vm/docs/os-and-machine-type#machine-type).

     `onHostMaintenance`
     :   Specifies the behavior of the VM during a host maintenance event, such as a hardware or software update. For a machine that uses Confidential VM, this value must be set to `Terminate`, which stops the VM. Confidential VMs do not support live VM migration.
  2. To use confidential VMs for only compute machines:

     ```yaml
     compute:
     - platform:
         gcp:
            confidentialCompute: AMDEncryptedVirtualizationNestedPaging
            type: n2d-standard-8
            onHostMaintenance: Terminate
     ```
  3. To use confidential VMs for all machines:

     ```yaml
     platform:
       gcp:
         defaultMachinePlatform:
            confidentialCompute: AMDEncryptedVirtualizationNestedPaging
            type: n2d-standard-8
            onHostMaintenance: Terminate
     ```

**Additional resources**
{._additional-resources}

- [Additional Google Cloud configuration parameters](/openshift-docs-markdown/installing/installing_gcp/installation-config-parameters-gcp#installation-configuration-parameters-additional-gcp_installation-config-parameters-gcp)

### Enabling a user-managed DNS {#installation-gcp-enabling-user-managed-DNS_installing-restricted-networks-gcp-installer-provisioned}

You can install a cluster with a domain name server (DNS) solution that you manage instead of the default cluster-provisioned DNS solution. As a result, you can manage the API and Ingress DNS records in your own system rather than adding the records to the DNS of the cloud.

For example, your organization’s security policies might not allow the use of public DNS services such as Google Cloud DNS. In such scenarios, you can use your own DNS service to bypass the public DNS service and manage your own DNS for the IP addresses of the API and Ingress services.

If you enable user-managed DNS during installation, the installation program provisions DNS records for the API and Ingress services only within the cluster. To ensure access from outside the cluster, you must provision the DNS records in an external DNS service of your choice for the API and Ingress services after installation.

For information about provisioning your DNS records for the API server and the Ingress services, see "Provisioning your own DNS records".

**Prerequisites**

- You installed the `jq` package.

**Procedure**

- Before you deploy your cluster, use a text editor to open the `install-config.yaml` file  and add the following stanza:

  - To enable user-managed DNS:

    ```yaml
    platform:
      gcp:
        userProvisionedDNS: Enabled
    ```

    where:

    `Enabled`
    :   Enables user-provisioned DNS management.

**Additional resources**
{._additional-resources}

- [Installation configuration parameters for Google Cloud](/openshift-docs-markdown/installing/installing_gcp/installation-config-parameters-gcp#installation-config-parameters-gcp)

### Sample customized install-config.yaml file for Google Cloud {#installation-gcp-config-yaml_installing-restricted-networks-gcp-installer-provisioned}

To specify more details about your OpenShift Container Platform cluster’s platform or modify the values of the required parameters, you can customize the `install-config.yaml` file.

> [!IMPORTANT]
> This sample YAML file is provided for reference only. You must obtain your `install-config.yaml` file by using the installation program and modify it.

```yaml
apiVersion: v1
baseDomain: example.com
pullSecret: '{"auths": ...}'
controlPlane:
  name: master
  replicas: 3
  platform:
    gcp:
      type: n2-standard-4
compute:
- name: worker
  replicas: 3
  platform:
    gcp:
      type: n2-standard-4
metadata:
  name: test-cluster
networking:
  clusterNetwork:
  - cidr: 10.128.0.0/14
    hostPrefix: 23
platform:
  gcp:
    projectID: sample-project
    region: us-east1
```

where:

`controlPlane`
:   Specifies parameters that apply to control plane machines.

`compute`
:   Specifies parameters that apply to compute machines.

`networking`
:   Specifies parameters that apply to the cluster networking configuration. If you do not provide networking values, the installation program provides default values.

`platform`
:   Specifies parameters that apply to the infrastructure platform that hosts the cluster.

**Additional resources**
{._additional-resources}

- [Installation configuration parameters for GCP](/openshift-docs-markdown/installing/installing_gcp/installation-config-parameters-gcp#installation-config-parameters-gcp)

### Create an Ingress Controller with global access on Google Cloud {#nw-gcp-global-access-configuration_installing-restricted-networks-gcp-installer-provisioned}

You can create an Ingress Controller that has global access to a Google Cloud cluster, which allows clients from any region to reach your cluster’s internal load balancer. Global access is available only to Ingress Controllers that use internal load balancers.

**Prerequisites**

- You created the `install-config.yaml` and complete any modifications to it.

**Procedure**

1. Change to the directory that contains the installation program and create a manifest file:

   ```terminal
   $ ./openshift-install create manifests --dir <installation_directory>
   ```

   For `_<installation_directory>_`, specify the name of the directory that contains the `install-config.yaml` file for your cluster.
2. Create a file that is named `cluster-ingress-default-ingresscontroller.yaml` in the `<installation_directory>/manifests/` directory:

   ```terminal
   $ touch <installation_directory>/manifests/cluster-ingress-default-ingresscontroller.yaml
   ```

   For `_<installation_directory>_`, specify the directory name that contains the `manifests/` directory for your cluster.

   After creating the file, several network configuration files are in the `manifests/` directory, as shown:

   ```terminal
   $ ls <installation_directory>/manifests/cluster-ingress-default-ingresscontroller.yaml
   ```

   ```terminal {title="Example output"}
   cluster-ingress-default-ingresscontroller.yaml
   ```
3. Open the `cluster-ingress-default-ingresscontroller.yaml` file in an editor and enter a custom resource (CR) that describes the Operator configuration you want:

   ```yaml {title="Sample clientAccess configuration to Global"}
     apiVersion: operator.openshift.io/v1
     kind: IngressController
     metadata:
       name: default
       namespace: openshift-ingress-operator
     spec:
       endpointPublishingStrategy:
         loadBalancer:
           providerParameters:
             gcp:
               clientAccess: Global
             type: GCP
           scope: Internal
         type: LoadBalancerService
   ```

   - `gcp.clientAccess` is set to `Global` to provide global access for the Ingress Controller.
   - `scope` is set to `Internal` because global access is available only to Ingress Controllers that use internal load balancers.

### Configuring the cluster-wide proxy during installation {#installation-configure-proxy_installing-restricted-networks-gcp-installer-provisioned}

Production environments can deny direct access to the internet and instead have an HTTP or HTTPS proxy available. You can configure a new OpenShift Container Platform cluster to use a proxy by configuring the proxy settings in the `install-config.yaml` file.

**Prerequisites**

- You have an existing `install-config.yaml` file.
- You have reviewed the sites that your cluster requires access to and determined whether any of them need to bypass the proxy. By default, the proxy handles all cluster egress traffic, including calls to hosting cloud provider APIs. You added sites to the `Proxy` object’s `spec.noProxy` field to bypass the proxy if necessary.

  > [!NOTE]
  > The `Proxy` object `status.noProxy` field includes the values of the `networking.machineNetwork[].cidr`, `networking.clusterNetwork[].cidr`, and `networking.serviceNetwork[]` fields from your installation configuration.
  >
  > For installations on Amazon Web Services (AWS), Google Cloud, Microsoft Azure, and Red Hat OpenStack Platform (RHOSP), the `Proxy` object `status.noProxy` field also includes the instance metadata endpoint (`169.254.169.254`).

**Procedure**

1. Edit your `install-config.yaml` file and add the proxy settings. For example:

   ```yaml
   apiVersion: v1
   baseDomain: my.domain.com
   proxy:
     httpProxy: http://<username>:<pswd>@<ip>:<port>
     httpsProxy: https://<username>:<pswd>@<ip>:<port>
     noProxy: example.com
   additionalTrustBundle: |
       -----BEGIN CERTIFICATE-----
       <MY_TRUSTED_CA_CERT>
       -----END CERTIFICATE-----
   additionalTrustBundlePolicy: <policy_to_add_additionalTrustBundle>
   # ...
   ```

   where:

   `proxy.httpProxy`
   :   Specifies a proxy URL to use for creating HTTP connections outside the cluster. The URL scheme must be `http`.

   `proxy.httpsProxy`
   :   Specifies a proxy URL to use for creating HTTPS connections outside the cluster.

   `proxy.noProxy`
   :   Specifies a comma-separated list of destination domain names, IP addresses, or other network CIDRs to exclude from proxying. Preface a domain with `.` to match subdomains only. For example, `.y.com` matches `x.y.com`, but not `y.com`. Use `*` to bypass the proxy for all destinations.

   `additionalTrustBundle`
   :   If you specify this value, the installation program generates a config map named `user-ca-bundle` in the `openshift-config` namespace to hold the additional CA certificates. If you specify `additionalTrustBundle` and at least one proxy setting, the `Proxy` object references the `user-ca-bundle` config map in the `trustedCA` field. The Cluster Network Operator then creates a `trusted-ca-bundle` config map that merges the contents specified for the `trustedCA` parameter with the RHCOS trust bundle. You must set the `additionalTrustBundle` field unless an authority from the RHCOS trust bundle signs the proxy’s identity certificate.

   `additionalTrustBundlePolicy`
   :   Specifies the policy that determines the configuration of the `Proxy` object to reference the `user-ca-bundle` config map in the `trustedCA` field. The allowed values are `Proxyonly` and `Always`. Use `Proxyonly` to reference the `user-ca-bundle` config map only when you configure an `http/https` proxy. Use `Always` to always reference the `user-ca-bundle` config map. The default value is `Proxyonly`. Optional parameter.

   > [!NOTE]
   > The installation program does not support the proxy `readinessEndpoints` field.

   > [!NOTE]
   > If the installation program times out, restart and then complete the deployment by using the `wait-for` command of the installation program. For example:
   >
   > ```terminal
   > $ ./openshift-install wait-for install-complete --log-level debug
   > ```
2. Save the file and reference it when installing OpenShift Container Platform.

   The installation program creates a cluster-wide proxy named `cluster` that uses the proxy settings in the `install-config.yaml` file. If you do not give proxy settings, the installation program still creates a `cluster` `Proxy` object, but it has a nil `spec`.

   > [!NOTE]
   > Only the `Proxy` object named `cluster` is supported, and you cannot create additional proxies.

## Installing the OpenShift CLI on Linux {#cli-installing-cli-linux_installing-restricted-networks-gcp-installer-provisioned}

To manage your cluster and deploy applications from the command line on Linux, install the OpenShift CLI (`oc`) binary. You can download the OpenShift CLI (`oc`) from the Red  Customer Portal.

> [!IMPORTANT]
> If you installed an earlier version of `oc`, you cannot use it to complete all of the commands in OpenShift Container Platform.
>
> Download and install the new version of `oc`.

**Procedure**

1. Navigate to the [Download OpenShift Container Platform](https://access.redhat.com/downloads/content/290) page on the Red Hat Customer Portal.
2. Select the architecture from the **Product Variant** list.
3. Select the appropriate version from the **Version** list.
4. Click **Download Now** next to the **OpenShift v4.22 Linux Clients** entry and save the file.
5. Unpack the archive:

   ```terminal
   $ tar xvf <file>
   ```
6. Place the `oc` binary in a directory that is on your `PATH`.

   To check your `PATH`, run the following command:

   ```terminal
   $ echo $PATH
   ```

**Verification**

- After you install the OpenShift CLI, it is available using the `oc` command:

  ```terminal
  $ oc <command>
  ```

## Installing the OpenShift CLI on Windows {#cli-installing-cli-windows_installing-restricted-networks-gcp-installer-provisioned}

To manage your cluster and deploy applications from the command line on Windows, install the OpenShift CLI (`oc`) binary. You can download the OpenShift CLI (`oc`) from the Red  Customer Portal.

> [!IMPORTANT]
> If you installed an earlier version of `oc`, you cannot use it to complete all of the commands in OpenShift Container Platform.
>
> Download and install the new version of `oc`.

**Procedure**

1. Navigate to the [Download OpenShift Container Platform](https://access.redhat.com/downloads/content/290) page on the Red Hat Customer Portal.
2. Select the appropriate version from the **Version** list.
3. Click **Download Now** next to the **OpenShift v4.22 Windows Client** entry and save the file.
4. Extract the archive with a ZIP program.
5. Move the `oc` binary to a directory that is on your `PATH` variable.

   To check your `PATH` variable, open the Command Prompt and run the following command:

   ```terminal
   C:\> path
   ```

**Verification**

- After you install the OpenShift CLI, it is available using the `oc` command:

  ```terminal
  C:\> oc <command>
  ```

## Installing the OpenShift CLI on macOS {#cli-installing-cli-macos_installing-restricted-networks-gcp-installer-provisioned}

To manage your cluster and deploy applications from the command line on macOS, install the OpenShift CLI (`oc`) binary. You can download the OpenShift CLI (`oc`) from the Red  Customer Portal.

> [!IMPORTANT]
> If you installed an earlier version of `oc`, you cannot use it to complete all of the commands in OpenShift Container Platform.
>
> Download and install the new version of `oc`.

**Procedure**

1. Navigate to the [Download OpenShift Container Platform](https://access.redhat.com/downloads/content/290) page on the Red Hat Customer Portal.
2. Select the architecture from the **Product Variant** list.
3. Select the appropriate version from the **Version** list.
4. Click **Download Now** next to the **OpenShift v4.22 macOS Clients** entry and save the file.

   > [!NOTE]
   > For macOS arm64, choose the **OpenShift v4.22 macOS arm64 Client** entry.
5. Extract the archive.
6. Move the `oc` binary to a directory on your `PATH` variable.

   To check your `PATH` variable, open a terminal and run the following command:

   ```terminal
   $ echo $PATH
   ```

**Verification**

- Verify your installation by using an `oc` command:

  ```terminal
  $ oc <command>
  ```

## Alternatives to storing administrator-level secrets in the kube-system project {#installing-gcp-manual-modes_installing-restricted-networks-gcp-installer-provisioned}

By default, OpenShift Container Platform stores administrator secrets in the `kube-system` project. If you configured the `credentialsMode` parameter in the `install-config.yaml` file to `Manual`, you must configure an alternative credential management strategy by using either long-term manual credentials or short-term credentials that are managed outside the cluster.

- To manage long-term cloud credentials manually, follow the procedure in "Manually creating long-term credentials".
- To implement short-term credentials that are managed outside the cluster for individual components, follow the procedures in "Short-term credential configuration for a Google Cloud cluster".

### Manually creating long-term credentials {#manually-create-iam_installing-restricted-networks-gcp-installer-provisioned}

You can put the Cloud Credential Operator (CCO) into manual mode before OpenShift Container Platform installation if the cloud identity and access management (IAM) APIs are not reachable, or if you prefer not to store an administrator-level credential secret in the cluster `kube-system` namespace.

**Procedure**

1. Add the following granular permissions to the Google Cloud account that the installation program uses:

   - compute.machineTypes.list
   - compute.regions.list
   - compute.zones.list
   - dns.changes.create
   - dns.changes.get
   - dns.managedZones.create
   - dns.managedZones.delete
   - dns.managedZones.get
   - dns.managedZones.list
   - dns.networks.bindPrivateDNSZone
   - dns.resourceRecordSets.create
   - dns.resourceRecordSets.delete
   - dns.resourceRecordSets.list
2. If you did not set the `credentialsMode` parameter in the `install-config.yaml` configuration file to `Manual`, modify the value as shown:

   ```yaml {title="Sample configuration file snippet"}
   apiVersion: v1
   baseDomain: example.com
   credentialsMode: Manual
   # ...
   ```
3. If you have not previously created installation manifest files, do so by running the following command:

   ```terminal
   $ openshift-install create manifests --dir <installation_directory>
   ```

   where `<installation_directory>` is the directory in which the installation program creates files.
4. Set a `$RELEASE_IMAGE` variable with the release image from your installation file by running the following command:

   ```terminal
   $ RELEASE_IMAGE=$(./openshift-install version | awk '/release image/ {print $3}')
   ```
5. Extract the list of `CredentialsRequest` custom resources (CRs) from the OpenShift Container Platform release image by running the following command:

   ```terminal
   $ oc adm release extract \
     --from=$RELEASE_IMAGE \
     --credentials-requests \
     --included \
     --install-config=<path_to_directory_with_installation_configuration>/install-config.yaml \
     --to=<path_to_directory_for_credentials_requests>
   ```

   where:

   `--included`
   :   Specifies only the manifests that your specific cluster configuration requires.

   `<path_to_directory_with_installation_configuration>`
   :   Specifies the location of the `install-config.yaml` file.

   `<path_to_directory_for_credentials_requests>`
   :   Specifies the path to the directory where you want to store the `CredentialsRequest` objects. If the specified directory does not exist, this command creates it. This command creates a YAML file for each `CredentialsRequest` object.

   ```yaml {title="Sample CredentialsRequest object"}
   apiVersion: cloudcredential.openshift.io/v1
   kind: CredentialsRequest
   metadata:
     name: <component_credentials_request>
     namespace: openshift-cloud-credential-operator
     ...
   spec:
     providerSpec:
       apiVersion: cloudcredential.openshift.io/v1
       kind: GCPProviderSpec
       predefinedRoles:
       - roles/storage.admin
       - roles/iam.serviceAccountUser
       skipServiceCheck: true
     ...
   ```
6. Create YAML files for secrets in the `openshift-install` manifests directory that you generated previously. The secrets must be stored using the namespace and secret name defined in the `spec.secretRef` for each `CredentialsRequest` object.

   ```yaml {title="Sample CredentialsRequest object with secrets"}
   apiVersion: cloudcredential.openshift.io/v1
   kind: CredentialsRequest
   metadata:
     name: <component_credentials_request>
     namespace: openshift-cloud-credential-operator
     ...
   spec:
     providerSpec:
       apiVersion: cloudcredential.openshift.io/v1
         ...
     secretRef:
       name: <component_secret>
       namespace: <component_namespace>
     ...
   ```

   ```yaml {title="Sample Secret object"}
   apiVersion: v1
   kind: Secret
   metadata:
     name: <component_secret>
     namespace: <component_namespace>
   data:
     service_account.json: <base64_encoded_gcp_service_account_file>
   ```

   > [!IMPORTANT]
   > Before upgrading a cluster that uses manually maintained credentials, you must ensure that the CCO is in an upgradeable state.

### Short-term credential configuration for a Google Cloud cluster {#installing-gcp-with-short-term-creds_installing-restricted-networks-gcp-installer-provisioned}

To install an OpenShift Container Platform cluster that is configured to use Google Cloud Workload Identity, you must configure the Cloud Credential Operator (CCO) utility and create the required Google Cloud resources for your cluster.

Cluster Operators use the credentials created by the CCO. The installation program does not use these credentials.

#### Configuring the Cloud Credential Operator utility {#cco-ccoctl-configuring_installing-restricted-networks-gcp-installer-provisioned}

To create and manage cloud credentials from outside of the cluster when the Cloud Credential Operator (CCO) is operating in manual mode, extract and prepare the CCO utility (`ccoctl`) binary.

> [!NOTE]
> The `ccoctl` utility is a Linux binary that must run in a Linux environment.

**Prerequisites**

- You have access to an OpenShift Container Platform account with cluster administrator access.
- You have installed the OpenShift CLI (`oc`).
- You have added one of the following authentication options to the Google Cloud account that the `ccoctl` utility uses:

  - The **IAM Workload Identity Pool Admin** role
  - The following granular permissions:

    - `compute.projects.get`
    - `iam.googleapis.com/workloadIdentityPoolProviders.create`
    - `iam.googleapis.com/workloadIdentityPoolProviders.get`
    - `iam.googleapis.com/workloadIdentityPools.create`
    - `iam.googleapis.com/workloadIdentityPools.delete`
    - `iam.googleapis.com/workloadIdentityPools.get`
    - `iam.googleapis.com/workloadIdentityPools.undelete`
    - `iam.roles.create`
    - `iam.roles.delete`
    - `iam.roles.list`
    - `iam.roles.undelete`
    - `iam.roles.update`
    - `iam.serviceAccounts.create`
    - `iam.serviceAccounts.delete`
    - `iam.serviceAccounts.getIamPolicy`
    - `iam.serviceAccounts.list`
    - `iam.serviceAccounts.setIamPolicy`
    - `iam.workloadIdentityPoolProviders.get`
    - `iam.workloadIdentityPools.delete`
    - `resourcemanager.projects.get`
    - `resourcemanager.projects.getIamPolicy`
    - `resourcemanager.projects.setIamPolicy`
    - `storage.buckets.create`
    - `storage.buckets.delete`
    - `storage.buckets.get`
    - `storage.buckets.getIamPolicy`
    - `storage.buckets.setIamPolicy`
    - `storage.objects.create`
    - `storage.objects.delete`
    - `storage.objects.list`

**Procedure**

1. Set a variable for the OpenShift Container Platform release image by running the following command:

   ```terminal
   $ RELEASE_IMAGE=$(./openshift-install version | awk '/release image/ {print $3}')
   ```
2. Obtain the CCO container image from the OpenShift Container Platform release image by running the following command:

   ```terminal
   $ CCO_IMAGE=$(oc adm release info --image-for='cloud-credential-operator' $RELEASE_IMAGE -a ~/.pull-secret)
   ```

   > [!NOTE]
   > Ensure that the architecture of the `$RELEASE_IMAGE` matches the architecture of the environment in which you will use the `ccoctl` tool.
3. Extract the `ccoctl` binary from the CCO container image within the OpenShift Container Platform release image by running the following command:

   ```terminal
   $ oc image extract $CCO_IMAGE \
     --file="/usr/bin/ccoctl.<rhel_version>" \
     -a ~/.pull-secret
   ```

   For `<rhel_version>`, specify the value that corresponds to the version of Red Hat Enterprise Linux (RHEL) that the host uses. If no value is specified, `ccoctl.rhel8` is used by default. The following values are valid:

   - `rhel8`: Specify this value for hosts that use RHEL 8.
   - `rhel9`: Specify this value for hosts that use RHEL 9.

     > [!NOTE]
     > The `ccoctl` binary is created in the directory from where you executed the command and not in `/usr/bin/`. You must rename the directory or move the `ccoctl.<rhel_version>` binary to `ccoctl`.
4. Change the permissions to make `ccoctl` executable by running the following command:

   ```terminal
   $ chmod 775 ccoctl
   ```

**Verification**

- To verify that `ccoctl` is ready to use, display the help file. Use a relative file name when you run the command, for example:

  ```terminal
  $ ./ccoctl
  ```

  ```terminal {title="Example output"}
  OpenShift credentials provisioning tool

  Usage:
    ccoctl [command]

  Available Commands:
    aws          Manage credentials objects for AWS cloud
    azure        Manage credentials objects for Azure
    gcp          Manage credentials objects for Google cloud
    help         Help about any command
    ibmcloud     Manage credentials objects for IBM Cloud
    nutanix      Manage credentials objects for Nutanix

  Flags:
    -h, --help   help for ccoctl

  Use "ccoctl [command] --help" for more information about a command.
  ```

#### Creating Google Cloud resources with the Cloud Credential Operator utility {#_creating_gcp_short_resources_with_the_cloud_credential_operator_utility}

You can use the `ccoctl gcp create-all` command to automate the creation of Google Cloud resources.

> [!NOTE]
> By default, `ccoctl` creates objects in the directory in which the commands are run. To create the objects in a different directory, use the `--output-dir` flag. This procedure uses `<path_to_ccoctl_output_dir>` to refer to this directory.

**Prerequisites**

You must have:

- Extracted and prepared the `ccoctl` binary.

**Procedure**

1. Set a `$RELEASE_IMAGE` variable with the release image from your installation file by running the following command:

   ```terminal
   $ RELEASE_IMAGE=$(./openshift-install version | awk '/release image/ {print $3}')
   ```
2. Extract the list of `CredentialsRequest` objects from the OpenShift Container Platform release image by running the following command:

   ```terminal
   $ oc adm release extract \
     --from=$RELEASE_IMAGE \
     --credentials-requests \
     --included \
     --install-config=<path_to_directory_with_installation_configuration>/install-config.yaml \
     --to=<path_to_directory_for_credentials_requests>
   ```

   where:

   `--included`
   :   Specifies to include only the manifests that your specific cluster configuration requires.

   `<path_to_directory_with_installation_configuration>`
   :   Specifies the location of the `install-config.yaml` file.

   `<path_to_directory_for_credentials_requests>`
   :   Specifies the path to the directory where you want to store the `CredentialsRequest` objects. If the specified directory does not exist, this command creates it.

   > [!NOTE]
   > This command might take a few moments to run.
3. Use the `ccoctl` tool to process all `CredentialsRequest` objects by running the following command:

   ```terminal
   $ ccoctl gcp create-all \
     --name=<name> \
     --region=<gcp_region> \
     --project=<gcp_project_id> \
     --credentials-requests-dir=<path_to_credentials_requests_directory> \
     --key-storage-method=<key_storage_method>
   ```

   where:

   `<name>`
   :   Specifies the user-defined name for all created Google Cloud resources used for tracking. If you plan to install the Google Cloud Filestore Container Storage Interface (CSI) Driver Operator, retain this value.

   `<gcp_region>`
   :   Specifies the Google Cloud region in which cloud resources will be created.

   `<gcp_project_id>`
   :   Specifies the Google Cloud project ID in which cloud resources will be created.

   `<path_to_credentials_requests_directory>`
   :   Specifies the directory containing the files of `CredentialsRequest` manifests to create Google Cloud service accounts.

   `<key_storage_method>`
   :   Specifies the method for storing OIDC JWK files. Accepted values are `public-bucket` and `pool-jwk-file`. The default value `public-bucket` creates a public GCS bucket to host the OIDC configuration and JWK files. The `pool-jwk-file` value attaches the JWK directly to the workload identity pool provider without creating a public bucket. This parameter is optional.

   > [!NOTE]
   > If your cluster uses Technology Preview features that are enabled by the `TechPreviewNoUpgrade` feature set, you must include the `--enable-tech-preview` parameter.

**Verification**

- To verify that the OpenShift Container Platform secrets are created, list the files in the `<path_to_ccoctl_output_dir>/manifests` directory:

  ```terminal
  $ ls <path_to_ccoctl_output_dir>/manifests
  ```

  ```text {title="Example output"}
  cluster-authentication-02-config.yaml
  openshift-cloud-controller-manager-gcp-ccm-cloud-credentials-credentials.yaml
  openshift-cloud-credential-operator-cloud-credential-operator-gcp-ro-creds-credentials.yaml
  openshift-cloud-network-config-controller-cloud-credentials-credentials.yaml
  openshift-cluster-api-capg-manager-bootstrap-credentials-credentials.yaml
  openshift-cluster-csi-drivers-gcp-pd-cloud-credentials-credentials.yaml
  openshift-image-registry-installer-cloud-credentials-credentials.yaml
  openshift-ingress-operator-cloud-credentials-credentials.yaml
  openshift-machine-api-gcp-cloud-credentials-credentials.yaml
  ```

  You can verify that the IAM service accounts are created by querying Google Cloud. For more information, refer to Google Cloud documentation on listing IAM service accounts.

#### Restricting service account impersonation to the compute nodes service account {#restricting-sa-impersonation-compute-sa-gcp_installing-restricted-networks-gcp-installer-provisioned}

After the Cloud Credential Operator utility (`ccoctl`) creates the resources for the cluster, you can restrict the Google Cloud `iam.serviceAccounts.actAs` permission that the `ccoctl` utility granted to the Machine API controller service account to the compute nodes service account.

> [!NOTE]
> Restricting service account impersonation to the compute nodes service account is optional. If your organization does not require this change, you can continue to "Incorporating the Cloud Credential Operator utility manifests".

When the `ccoctl` utility assigns custom and Google Cloud predefined roles to OpenShift Container Platform components service accounts, it grants the `iam.serviceAccounts.actAs` permission to the Machine API controller service account at the Google Cloud project level. To reduce the scope of the `iam.serviceAccounts.actAs` permission, you identify the custom role of the Machine API controller service account and replace it with a role that has a more restricted set of permissions. To allow this component to work, you then grant the Machine API controller service account the Service Account User role on the service account of the compute nodes instead.

**Prerequisites**

- You have configured an account with the cloud platform that hosts your cluster.
- You have used the `ccoctl` utility to create the cloud provider resources for your cluster.
- You have access to your `install-config.yaml` file.
- You have logged in to the Google Cloud CLI (`gcloud`) as a user with permissions to manage service accounts and roles.

**Procedure**

1. Obtain the following values from your `install-config.yaml` file:

   - The Google Cloud project name. In the YAML file, this is the value of the `platform.gcp.projectID` parameter.
   - The cluster name. In the YAML file, this is the value of the `metadata.name` parameter.
   - The service account for the compute nodes. In the YAML file, this is the value of the `compute[0].platform.gcp.serviceAccount` parameter.
2. Obtain the service account for the Machine API controller that the `ccoctl` utility created by running the following command:

   ```terminal
   $ gcloud iam service-accounts list \
     --filter="displayName=<cluster_name>-openshift-machine-api-gcp" \
     --format='value(email)'
   ```

   where `<cluster_name>` is the value specified for the `metadata.name` parameter in your `install-config.yaml` file.
3. Obtain the role ID of the custom role for the Machine API controller service account by running the following command:

   ```terminal
   $ gcloud projects get-iam-policy <project_name> \
     --flatten='bindings[].members' \
     --format='table(bindings.role)' \
     --filter="bindings.members:<machine_api_controller_service_account>"
   ```

   where `<machine_api_controller_service_account>` is the Machine API controller service account.
4. List the custom role permissions for the Machine API controller service account by running the following command:

   ```terminal
   $ gcloud iam roles describe <machine_api_role> \
     --project <project_name>
   ```

   where `<machine_api_role>` is the role ID of the custom role for the Machine API controller service account.

   ```text {title="Example output"}
   etag: <etag_value>
   includedPermissions:
   - compute.acceleratorTypes.get
   - compute.acceleratorTypes.list
   - compute.disks.create
   - compute.disks.createTagBinding
   ...
   - compute.zones.get
   - compute.zones.list
   - iam.serviceAccounts.actAs
   - iam.serviceAccounts.get
   - iam.serviceAccounts.list
   - resourcemanager.tagValues.get
   - resourcemanager.tagValues.list
   - serviceusage.quotas.get
   - serviceusage.services.get
   - serviceusage.services.list
   name: projects/<project_name>/roles/<machine_api_role>
   stage: GA
   title: <project_name>-openshift-machine-api-gcp
   ```

   where `<project_name>` is the Google Cloud project name specified in the `install-config.yaml` file.

   > [!NOTE]
   > This truncated example output might not match the permissions list for your cluster.
5. Create a custom role that includes all of the permissions from your output except for the `iam.serviceAccounts.actAs` permission by running a command similar to the following:

   ```terminal
   $ gcloud iam roles create <machine_api_role>_without_actas \
   --project=<project_name> \
   --title=<machine_api_role>_without_actas \
   --description="Required permissions for the Machine API controller without the iam.serviceAccounts.actAs permission" \
   --permissions=compute.acceleratorTypes.get,\
   compute.acceleratorTypes.list,\
   compute.disks.create,\
   compute.disks.createTagBinding,\
   ...
   compute.zones.get,\
   compute.zones.list,\
   iam.serviceAccounts.get,\
   iam.serviceAccounts.list,\
   resourcemanager.tagValues.get,\
   resourcemanager.tagValues.list,\
   serviceusage.quotas.get,\
   serviceusage.services.get,\
   serviceusage.services.list
   ```

   In this example, the new role name is the original custom role name, `<machine_api_role>`, with a `_without_actas` string added to the end.

   > [!IMPORTANT]
   > This truncated example command might not match the permissions list for your cluster. You must use the list of permissions from the output of the `gcloud iam roles describe <machine_api_role> --project <project_name>` command on your cluster.
6. Remove the custom role that includes the `iam.serviceAccounts.actAs` permission from the Machine API controller service account by running the following command:

   ```terminal
   $ gcloud projects remove-iam-policy-binding <project_name> \
     --member "serviceAccount:<machine_api_controller_service_account>" \
     --role "projects/<project_name>/roles/<machine_api_role>"
   ```

   where `<machine_api_role>` is the original custom role.
7. Grant the custom role that excludes the `iam.serviceAccounts.actAs` permission to the Machine API controller service account by running the following command:

   ```terminal
   $ gcloud projects add-iam-policy-binding <project_name> \
     --member "serviceAccount:<machine_api_controller_service_account>" \
     --role "projects/<project_name>/roles/<machine_api_role>_without_actas
   ```

   where `<machine_api_role>_without_actas` is the new custom role.
8. Optional: To verify that the Machine API controller service account has the correct role, check the attached role ID by running the following command:

   ```terminal
   $ gcloud projects get-iam-policy <project_name> \
     --flatten='bindings[].members' \
     --format='table(bindings.role)' \
     --filter="bindings.members:<machine_api_controller_service_account>"
   ```

   ```text {title="Example output"}
   ROLE
   projects/<project_name>/roles/<machine_api_role>_without_actas
   ```
9. Grant the Machine API controller service account the Service Account User role on the service account of the compute nodes by running the following command:

   ```terminal
   $ gcloud iam service-accounts add-iam-policy-binding <compute_nodes_service_account> \
     --member="serviceAccount:<machine_api_controller_service_account>" \
     --role=roles/iam.serviceAccountUser
   ```

   where `<compute_nodes_service_account>` is the service account for your compute nodes. This value is the `compute[0].platform.gcp.serviceAccount` parameter in your `install-config.yaml` file.

#### Incorporating the Cloud Credential Operator utility manifests {#cco-ccoctl-install-creating-manifests_installing-restricted-networks-gcp-installer-provisioned}

To implement short-term security credentials managed outside the cluster for individual OpenShift Container Platform components, you must move the manifest files that the Cloud Credential Operator utility (`ccoctl`) created to the correct directories for the installation program.

**Prerequisites**

- You have configured an account with the cloud platform that hosts your cluster.
- You have configured the Cloud Credential Operator utility (`ccoctl`).
- You have created the cloud provider resources that are required for your cluster with the `ccoctl` utility.

**Procedure**

1. Add the following granular permissions to the Google Cloud account that the installation program uses:

   - compute.machineTypes.list
   - compute.regions.list
   - compute.zones.list
   - dns.changes.create
   - dns.changes.get
   - dns.managedZones.create
   - dns.managedZones.delete
   - dns.managedZones.get
   - dns.managedZones.list
   - dns.networks.bindPrivateDNSZone
   - dns.resourceRecordSets.create
   - dns.resourceRecordSets.delete
   - dns.resourceRecordSets.list
2. If you did not set the `credentialsMode` parameter in the `install-config.yaml` configuration file to `Manual`, modify the value as shown:

   ```yaml {title="Sample configuration file snippet"}
   apiVersion: v1
   baseDomain: example.com
   credentialsMode: Manual
   # ...
   ```
3. If you have not previously created installation manifest files, do so by running the following command:

   ```terminal
   $ openshift-install create manifests --dir <installation_directory>
   ```

   where `<installation_directory>` is the directory in which the installation program creates files.
4. Copy the manifests that the `ccoctl` utility generated to the `manifests` directory that the installation program created by running the following command:

   ```terminal
   $ cp /<path_to_ccoctl_output_dir>/manifests/* ./manifests/
   ```
5. Copy the `tls` directory that contains the private key to the installation directory:

   ```terminal
   $ cp -a /<path_to_ccoctl_output_dir>/tls .
   ```

## Deploying the cluster {#installation-launching-installer_installing-restricted-networks-gcp-installer-provisioned}

To deploy your OpenShift Container Platform cluster, you initialize installation by running the `openshift-install create cluster` command from the directory that contains the installation program. The installation program provisions the required infrastructure and completes the cluster setup.

> [!IMPORTANT]
> You can run the `create cluster` command of the installation program only once, during initial installation.

**Prerequisites**

- You have configured an account with the cloud platform that hosts your cluster.
- You have the OpenShift Container Platform installation program and the pull secret for your cluster.
- You have verified that the cloud provider account on your host has the correct permissions to deploy the cluster. An account with incorrect permissions causes the installation process to fail with an error message that displays the missing permissions.

**Procedure**

1. Remove any existing Google Cloud credentials that do not use the service account key for the Google Cloud account that you configured for your cluster and that are stored in the following locations:

   - The `GOOGLE_CREDENTIALS`, `GOOGLE_CLOUD_KEYFILE_JSON`, or `GCLOUD_KEYFILE_JSON` environment variables
   - The `~/.gcp/osServiceAccount.json` file
   - The `gcloud cli` default credentials
2. In the directory that contains the installation program, initialize the cluster deployment by running the following command:

```terminal
$ ./openshift-install create cluster --dir <installation_directory> \
    --log-level=info
```

where:

- `<installation_directory>`: Specifies the location of your customized `./install-config.yaml` file.
- `--log-level`: Specifies the log level. To view different installation details, specify `warn`, `debug`, or `error` instead of `info`.

1. Optional: You can reduce the number of permissions for the service account that you used to install the cluster.

   - If you assigned the `Owner` role to your service account, you can remove that role and replace it with the `Viewer` role.
   - If you included the `Service Account Key Admin` role, you can remove it.

**Verification**

When the cluster deployment completes successfully:

- The terminal displays directions for accessing your cluster, including a link to the web console and credentials for the `kubeadmin` user.
- Credential information also outputs to `<installation_directory>/.openshift_install.log`.

  > [!IMPORTANT]
  > Do not delete the installation program or the files that the installation program creates. Both are required to delete the cluster.

  The following example shows the expected output:

  ```terminal
  ...
  INFO Install complete!
  INFO To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/home/myuser/install_dir/auth/kubeconfig'
  INFO Access the OpenShift web-console here: https://console-openshift-console.apps.mycluster.example.com
  INFO Login to the console with user: "kubeadmin", and password: "password"
  INFO Time elapsed: 36m22s
  ```

  > [!IMPORTANT]
  > - The Ignition config files that the installation program generates contain certificates that expire after 24 hours, which are then renewed at that time. If the cluster is shut down before renewing the certificates and the cluster is later restarted after the 24 hours have elapsed, the cluster automatically recovers the expired certificates. The exception is that you must manually approve the pending `node-bootstrapper` certificate signing requests (CSRs) to recover kubelet certificates. See the documentation for *Recovering from expired control plane certificates* for more information.
  > - It is recommended that you use Ignition config files within 12 hours after they are generated because the 24-hour certificate rotates from 16 to 22 hours after the cluster is installed. By using the Ignition config files within 12 hours, you can avoid installation failure if the certificate update runs during installation.

## Provisioning your own DNS records {#installation-gcp-provisioning-own-dns-records_installing-restricted-networks-gcp-installer-provisioned}

Use the IP address of the API server to provision your own DNS record with the `api.<cluster_name>.<base_domain>.` hostname by using your cluster name and base cluster domain. Use the IP address of the Ingress service to provision your own DNS record with the `*.apps.<cluster_name>.<base_domain>.` hostname by using your cluster name and base cluster domain.

> [!IMPORTANT]
> Before you use this feature, you must add the `userProvisionedDNS` parameter to the `install-config.yaml` file and enable the parameter. For more information, see "Enabling a user-managed DNS".

**Prerequisites**

- You installed your cluster.
- You installed the `gcloud` CLI tool.

**Procedure**

1. Determine the infrastructure ID of your cluster by running the following command:

   ```terminal
   $ infra_id=$(jq -r .infraID <installation_directory>/metadata.json)
   ```

   where:

   `<installation_directory>`
   :   Specifies the directory where you ran the installation program.
2. Find the IP address of the API server:

   1. If you installed a private cluster, determine the IP address of the API server by running the following command:

      ```terminal
      $ gcloud compute forwarding-rules describe "${infra_id}-api-internal" --project=<project_name> --region <region_name> --format json | jq -r .IPAddress
      ```

      where:

      `<project_name>`
      :   Specifies the name of your Google Cloud project.

      `<region_name>`
      :   Specifies the region where you installed your cluster.
   2. If you installed a public cluster, determine the IP address of the API server by running the following command:

      ```terminal
      $ gcloud compute forwarding-rules describe --global "${infra_id}-apiserver" --format json | jq -r .IPAddress
      ```
3. Use the IP address to provision your own DNS record with the `api.<cluster_name>.<base_domain>.` hostname by using your cluster name and base cluster domain.
4. Find the IP address of the Ingress service:

   1. If you installed a private cluster, find the IP address of the Ingress service by running the following command:

      ```terminal
      $ gcloud compute forwarding-rules list --project=<project_name> --filter="subnetwork:(projects/<project_name>/regions/<region_name>/subnetworks/<compute_subnet_name>)" --format="json" | jq -r '.[].IPAddress'
      ```

      where:

      `<project_name>`
      :   Specifies the name of your Google Cloud project.

      `<region_name>`
      :   Specifies the region where you installed your cluster.

      `<compute_subnet_name>`
      :   Specifies the name of the subnet that contains your compute nodes.
   2. If you installed a public cluster, find the IP address by using the forwarding rule:

      1. Find the forwarding rule for the Ingress service by running the following command:

         ```terminal
         $ ingress_forwarding_rule=$(gcloud compute target-pools list --format=json --filter="instances[]~${infra_id}" | jq -r .[].name)
         ```
      2. Use the forwarding rule value to find the IP address of the Ingress service by running the following command:

         ```terminal
         $ gcloud compute forwarding-rules describe --region "<region_name>" "${ingress_forwarding_rule}" --format json | jq -r .IPAddress
         ```

         where:

         `<region_name>`
         :   Specifies the region where you installed your cluster.
5. Use the IP address to provision your own DNS record with the `*.apps.<cluster_name>.<base_domain>.` hostname by using your cluster name and base cluster domain.

**Additional resources**
{._additional-resources}

- [Additional Google Cloud configuration parameters](/openshift-docs-markdown/installing/installing_gcp/installation-config-parameters-gcp#installation-configuration-parameters-additional-gcp_installation-config-parameters-gcp)

## Logging in to the cluster by using the CLI {#cli-logging-in-kubeadmin_installing-restricted-networks-gcp-installer-provisioned}

To log in to your cluster as the default system user, export the `kubeconfig` file. This configuration enables the CLI to authenticate and connect to the specific API server created during OpenShift Container Platform installation.

The `kubeconfig` file is specific to a cluster and OpenShift Container Platform generates it during installation.

**Prerequisites**

- You deployed an OpenShift Container Platform cluster.
- You installed the OpenShift CLI (`oc`).

**Procedure**

1. Export the `kubeadmin` credentials by running the following command:

   ```terminal
   $ export KUBECONFIG=<installation_directory>/auth/kubeconfig
   ```

   where:

   `<installation_directory>`
   :   Specifies the path to the directory that stores the installation files.
2. Verify you can run `oc` commands successfully using the exported configuration by running the following command:

   ```terminal
   $ oc whoami
   ```

   ```terminal {title="Example output"}
   system:admin
   ```

**Next steps**

- "Customize your cluster"
- "Remote health reporting"

## Disabling the default software catalog sources {#olm-restricted-networks-operatorhub_installing-restricted-networks-gcp-installer-provisioned}

To use only trusted or locally available Operator catalogs, disable the default software catalog sources that OpenShift Container Platform configures during installation. In a restricted network environment, you must disable the default catalogs as a cluster administrator.

**Procedure**

- Disable the sources for the default catalogs by adding `disableAllDefaultSources: true` to the `OperatorHub` object:

  ```terminal
  $ oc patch OperatorHub cluster --type json \
      -p '[{"op": "add", "path": "/spec/disableAllDefaultSources", "value": true}]'
  ```

  > [!TIP]
  > Or, you can use the web console to manage catalog sources. From the **Administration** → **Cluster Settings** → **Configuration** → **OperatorHub** page, click the **Sources** tab, where you can create, update, delete, disable, and enable individual sources.

## Telemetry access for OpenShift Container Platform {#cluster-telemetry_installing-restricted-networks-gcp-installer-provisioned}

To provide metrics about cluster health and the success of updates, the Telemetry service requires internet access. When connected, this service runs automatically by default and registers your cluster to [OpenShift Cluster Manager](https://console.redhat.com/openshift).

After you confirm that your [OpenShift Cluster Manager](https://console.redhat.com/openshift) inventory is correct, either maintained automatically by Telemetry or manually by using OpenShift Cluster Manager,use subscription watch to track your OpenShift Container Platform subscriptions at the account or multi-cluster level. For more information about subscription watch, see "Data Gathered and Used by Red Hat’s subscription services" in the *Additional resources* section.

**Additional resources**
{._additional-resources}

- [About remote health monitoring](/openshift-docs-markdown/support/remote_health_monitoring/about-remote-health-monitoring#about-remote-health-monitoring)
- [Validating an installation](/openshift-docs-markdown/installing/validation_and_troubleshooting/validating-an-installation#validating-an-installation)
- [Customizing your cluster](/openshift-docs-markdown/post_installation_configuration/cluster-tasks#available_cluster_customizations)
- [Configuring image streams for a disconnected cluster](/openshift-docs-markdown/post_installation_configuration/cluster-tasks#post-install-must-gather-disconnected)
- [Using Operator Lifecycle Manager in disconnected environments](/openshift-docs-markdown/disconnected/using-olm#olm-restricted-networks)
- [Configuring additional trust stores](/openshift-docs-markdown/openshift_images/image-configuration#images-configuration-cas_image-configuration)
- [Remote health reporting](/openshift-docs-markdown/support/remote_health_monitoring/remote-health-reporting#remote-health-reporting)
- [Registering your disconnected cluster](/openshift-docs-markdown/support/remote_health_monitoring/remote-health-reporting#insights-operator-register-disconnected-cluster_remote-health-reporting)
