Compute Engine API
In OpenShift Container Platform version 4.10, you can install a cluster into a shared Virtual Private Cloud (VPC) on Google Cloud Platform (GCP) that uses infrastructure that you provide. In this context, a cluster installed into a shared VPC is a cluster that is configured to use a VPC from a project different from where the cluster is being deployed.
A shared VPC enables an organization to connect resources from multiple projects to a common VPC network. You can communicate within the organization securely and efficiently by using internal IPs from that network. For more information about shared VPC, see Shared VPC overview in the GCP documentation.
The steps for performing a user-provided infrastructure installation into a shared VPC are outlined here. Several Deployment Manager templates are provided to assist in completing these steps or to help model your own. You are also free to create the required resources through other methods.
The steps for performing a user-provisioned infrastructure installation are provided as an example only. Installing a cluster with infrastructure you provide requires knowledge of the cloud provider and the installation process of OpenShift Container Platform. Several Deployment Manager templates are provided to assist in completing these steps or to help model your own. You are also free to create the required resources through other methods; the templates are just an example. |
You reviewed details about the OpenShift Container Platform installation and update processes.
You read the documentation on selecting a cluster installation method and preparing it for users.
If you use a firewall and plan to use the Telemetry service, you configured the firewall to allow the sites that your cluster requires access to.
If the cloud identity and access management (IAM) APIs are not accessible in your environment, or if you do not want to store an administrator-level credential secret in the kube-system
namespace, you can manually create and maintain IAM credentials.
Be sure to also review this site list if you are configuring a proxy. |
Because your cluster has limited access to automatic machine management when you use infrastructure that you provision, you must provide a mechanism for approving cluster certificate signing requests (CSRs) after installation. The kube-controller-manager
only approves the kubelet client CSRs. The machine-approver
cannot guarantee the validity of a serving certificate that is requested by using kubelet credentials because it cannot confirm that the correct machine issued the request. You must determine and implement a method of verifying the validity of the kubelet serving certificate requests and approving them.
In OpenShift Container Platform 4.10, you require access to the internet to install your cluster.
You must have internet access to:
Access OpenShift Cluster Manager 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.
If your cluster cannot have direct internet access, you can perform a restricted network installation on some types of infrastructure that you provision. During that process, you download the required content and use it to populate a mirror registry with the installation packages. With some installation types, the environment that you install your cluster in will not require internet access. Before you update the cluster, you update the content of the mirror registry. |
Before you can install OpenShift Container Platform, you must configure a Google Cloud Platform (GCP) project to host it.
To install OpenShift Container Platform, you must create a project in your Google Cloud Platform (GCP) account to host the cluster.
Create a project to host your OpenShift Container Platform cluster. See Creating and Managing Projects in the GCP documentation.
Your GCP project must use the Premium Network Service Tier if you are using installer-provisioned infrastructure. The Standard Network Service Tier is not supported for clusters installed using the installation program. The installation program configures internal load balancing for the |
Your Google Cloud Platform (GCP) project requires access to several API services to complete OpenShift Container Platform installation.
You created a project to host your cluster.
Enable the following required API services in the project that hosts your cluster. You can also enable optional API services which are not required for installation. See Enabling services in the GCP documentation.
API service | Console service name |
---|---|
Compute Engine API |
|
Cloud Resource Manager API |
|
Google DNS API |
|
IAM Service Account Credentials API |
|
Identity and Access Management (IAM) API |
|
Service Usage API |
|
API service | Console service name |
---|---|
Cloud Deployment Manager V2 API |
|
Google Cloud APIs |
|
Service Management API |
|
Google Cloud Storage JSON API |
|
Cloud Storage |
|
The OpenShift Container Platform cluster uses a number of Google Cloud Platform (GCP) components, but the default Quotas do not affect your ability to install a default OpenShift Container Platform cluster.
A default cluster, which contains three compute and three control plane machines, uses the following resources. Note that some resources are required only during the bootstrap process and are removed after the cluster deploys.
Service | Component | Location | Total resources required | Resources removed after bootstrap |
---|---|---|---|---|
Service account |
IAM |
Global |
5 |
0 |
Firewall rules |
Networking |
Global |
11 |
1 |
Forwarding rules |
Compute |
Global |
2 |
0 |
Health checks |
Compute |
Global |
2 |
0 |
Images |
Compute |
Global |
1 |
0 |
Networks |
Networking |
Global |
1 |
0 |
Routers |
Networking |
Global |
1 |
0 |
Routes |
Networking |
Global |
2 |
0 |
Subnetworks |
Compute |
Global |
2 |
0 |
Target pools |
Networking |
Global |
2 |
0 |
If any of the quotas are insufficient during installation, the installation program displays an error that states both which quota was exceeded and the region. |
Be sure to consider your actual cluster size, planned cluster growth, and any usage from other clusters that are associated with your account. The CPU, static IP addresses, and persistent disk SSD (storage) quotas are the ones that are most likely to be insufficient.
If you plan to deploy your cluster in one of the following regions, you will exceed the maximum storage quota and are likely to exceed the CPU quota limit:
asia-east2
asia-northeast2
asia-south1
australia-southeast1
europe-north1
europe-west2
europe-west3
europe-west6
northamerica-northeast1
southamerica-east1
us-west2
You can increase resource quotas from the GCP console, but you might need to file a support ticket. Be sure to plan your cluster size early so that you can allow time to resolve the support ticket before you install your OpenShift Container Platform cluster.
OpenShift Container Platform requires a Google Cloud Platform (GCP) service account that provides authentication and authorization to access data in the Google APIs. If you do not have an existing IAM service account that contains the required roles in your project, you must create one.
You created a project to host your cluster.
Create a service account in the project that you use to host your OpenShift Container Platform cluster. See Creating a service account in the GCP documentation.
Grant the service account the appropriate permissions. You can either
grant the individual permissions that follow or assign the Owner
role to it.
See Granting roles to a service account for specific resources.
While making the service account an owner of the project is the easiest way to gain the required permissions, it means that service account has complete control over the project. You must determine if the risk that comes from offering that power is acceptable. |
Create the service account key in JSON format. See Creating service account keys in the GCP documentation.
The service account key is required to create a cluster.
When you attach the Owner
role to the service account that you create, you
grant that service account all permissions, including those that are required to
install OpenShift Container Platform. To deploy an OpenShift Container Platform cluster, the service
account requires the following permissions. If you deploy your cluster into an existing VPC, the service account does not require certain networking permissions, which are noted in the following lists:
Compute Admin
Security Admin
Service Account Admin
Service Account User
Storage Admin
DNS Administrator
Deployment Manager Editor
Service Account Key Admin
For the cluster to create new limited credentials for its Operators, add the following role:
Service Account Key Admin
The roles are applied to the service accounts that the control plane and compute machines use:
Account | Roles |
---|---|
Control Plane |
|
|
|
|
|
|
|
|
|
Compute |
|
|
You can deploy an OpenShift Container Platform cluster to the following Google Cloud Platform (GCP) regions:
asia-east1
(Changhua County, Taiwan)
asia-east2
(Hong Kong)
asia-northeast1
(Tokyo, Japan)
asia-northeast2
(Osaka, Japan)
asia-northeast3
(Seoul, South Korea)
asia-south1
(Mumbai, India)
asia-south2
(Delhi, India)
asia-southeast1
(Jurong West, Singapore)
asia-southeast2
(Jakarta, Indonesia)
australia-southeast1
(Sydney, Australia)
australia-southeast2
(Melbourne, Australia)
europe-central2
(Warsaw, Poland)
europe-north1
(Hamina, Finland)
europe-southwest1
(Madrid, Spain)
europe-west1
(St. Ghislain, Belgium)
europe-west2
(London, England, UK)
europe-west3
(Frankfurt, Germany)
europe-west4
(Eemshaven, Netherlands)
europe-west6
(Zürich, Switzerland)
europe-west8
(Milan, Italy)
europe-west9
(Paris, France)
northamerica-northeast1
(Montréal, Québec, Canada)
northamerica-northeast2
(Toronto, Ontario, Canada)
southamerica-east1
(São Paulo, Brazil)
southamerica-west1
(Santiago, Chile)
us-central1
(Council Bluffs, Iowa, USA)
us-east1
(Moncks Corner, South Carolina, USA)
us-east4
(Ashburn, Northern Virginia, USA)
us-east5
(Columbus, Ohio)
us-south1
(Dallas, Texas)
us-west1
(The Dalles, Oregon, USA)
us-west2
(Los Angeles, California, USA)
us-west3
(Salt Lake City, Utah, USA)
us-west4
(Las Vegas, Nevada, USA)
To install OpenShift Container Platform on Google Cloud Platform (GCP) using user-provisioned infrastructure, you must install and configure the CLI tools for GCP.
You created a project to host your cluster.
You created a service account and granted it the required permissions.
Install the following binaries in $PATH
:
gcloud
gsutil
See Install the latest Cloud SDK version in the GCP documentation.
Authenticate using the gcloud
tool with your configured service account.
See Authorizing with a service account in the GCP documentation.
For a cluster that contains user-provisioned infrastructure, you must deploy all of the required machines.
This section describes the requirements for deploying OpenShift Container Platform on user-provisioned infrastructure.
The smallest OpenShift Container Platform clusters require the following hosts:
Hosts | Description |
---|---|
One temporary bootstrap machine |
The cluster requires the bootstrap machine to deploy the OpenShift Container Platform cluster on the three control plane machines. You can remove the bootstrap machine after you install the cluster. |
Three control plane machines |
The control plane machines run the Kubernetes and OpenShift Container Platform services that form the control plane. |
At least two compute machines, which are also known as worker machines. |
The workloads requested by OpenShift Container Platform users run on the compute machines. |
To maintain high availability of your cluster, use separate physical hosts for these cluster machines. |
The bootstrap and control plane machines must use Red Hat Enterprise Linux CoreOS (RHCOS) as the operating system. However, the compute machines can choose between Red Hat Enterprise Linux CoreOS (RHCOS), Red Hat Enterprise Linux (RHEL) 8.4, or RHEL 8.5.
Note that RHCOS is based on Red Hat Enterprise Linux (RHEL) 8 and inherits all of its hardware certifications and requirements. See Red Hat Enterprise Linux technology capabilities and limits.
Each cluster machine must meet the following minimum requirements:
Machine | Operating System | vCPU [1] | Virtual RAM | Storage | IOPS [2] |
---|---|---|---|---|---|
Bootstrap |
RHCOS |
4 |
16 GB |
100 GB |
300 |
Control plane |
RHCOS |
4 |
16 GB |
100 GB |
300 |
Compute |
RHCOS, RHEL 8.4, or RHEL 8.5 [3] |
2 |
8 GB |
100 GB |
300 |
One vCPU is equivalent to one physical core when simultaneous multithreading (SMT), or hyperthreading, 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 faster storage is recommended, particularly for etcd on the control plane nodes which require a 10 ms p99 fsync duration. Note that on many cloud platforms, storage size and IOPS scale together, so you might need to over-allocate storage volume to obtain sufficient 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. Use of RHEL 7 compute machines is deprecated and has been removed in OpenShift Container Platform 4.10 and later.
If an instance type for your platform meets the minimum requirements for cluster machines, it is supported to use in OpenShift Container Platform.
The following Google Cloud Platform instance types have been tested with OpenShift Container Platform.
C2
E2
M1
N1
N2
N2D
Tau T2D
Using a custom machine type to install a OpenShift Container Platform cluster is supported.
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
.
If you use a shared Virtual Private Cloud (VPC) to host your OpenShift Container Platform cluster in Google Cloud Platform (GCP), you must configure the project that hosts it.
If you already have a project that hosts the shared VPC network, review this section to ensure that the project meets all of the requirements to install an OpenShift Container Platform cluster. |
Create a project to host the shared VPC for your OpenShift Container Platform cluster. See Creating and Managing Projects in the GCP documentation.
Create a service account in the project that hosts your shared VPC. See Creating a service account in the GCP documentation.
Grant the service account the appropriate permissions. You can either
grant the individual permissions that follow or assign the Owner
role to it.
See Granting roles to a service account for specific resources.
While making the service account an owner of the project is the easiest way to gain the required permissions, it means that service account has complete control over the project. You must determine if the risk that comes from offering that power is acceptable. The service account for the project that hosts the shared VPC network requires the following roles:
|
To install OpenShift Container Platform, the Google Cloud Platform (GCP) account you use must have a dedicated public hosted zone in the project that hosts the shared VPC that you install the cluster into. This zone must be authoritative for the domain. The DNS service provides cluster DNS resolution and name lookup for external connections to the cluster.
Identify your domain, or subdomain, and registrar. You can transfer an existing domain and registrar or obtain a new one through GCP or another source.
If you purchase a new domain, it can take time for the relevant DNS changes to propagate. For more information about purchasing domains through Google, see Google Domains. |
Create a public hosted zone for your domain or subdomain in your GCP project. See Creating public zones in the GCP documentation.
Use an appropriate root domain, such as openshiftcorp.com
, or subdomain,
such as clusters.openshiftcorp.com
.
Extract the new authoritative name servers from the hosted zone records. See Look up your Cloud DNS name servers in the GCP documentation.
You typically have four name servers.
Update the registrar records for the name servers that your domain uses. For example, if you registered your domain to Google Domains, see the following topic in the Google Domains Help: How to switch to custom name servers.
If you migrated your root domain to Google Cloud DNS, migrate your DNS records. See Migrating to Cloud DNS in the GCP documentation.
If you use a subdomain, follow your company’s procedures to add its delegation records to the parent domain. This process might include a request to your company’s IT department or the division that controls the root domain and DNS services for your company.