Installing a private cluster on Google Cloud
In OpenShift Container Platform version 4.22, you can install a private cluster into an existing VPC on Google Cloud with customizations by using installer-provisioned infrastructure. A private cluster keeps its endpoints internal, preventing direct internet exposure.
You customize your cluster by modifying parameters in the install-config.yaml file before installation.
Prerequisites
- 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".
- If you use a firewall, you configured it to allow the sites that your cluster requires access to. For more information, see "Configuring your firewall for OpenShift Container Platform".
Private clusters
You can deploy a private OpenShift Container Platform cluster that does not expose external endpoints. Private clusters are accessible from only an internal network and are not visible to the internet.
By default, OpenShift Container Platform is provisioned to use publicly-accessible DNS and endpoints. A private cluster sets the DNS, Ingress Controller, and API server to private when you deploy your cluster. This means that the cluster resources are only accessible from your internal network and are not visible to the internet.
If the cluster has any public subnets, load balancer services created by administrators might be publicly accessible. To ensure cluster security, verify that these services are explicitly annotated as private.
To deploy a private cluster, you must:
- Use existing networking that meets your requirements. Your cluster resources might be shared between other clusters on the network.
- Deploy from a machine that has access to: ** The API services for the cloud to which you provision. ** The hosts on the network that you provision. ** The internet to obtain installation media.
Private clusters in Google Cloud
To create a private cluster on Google Cloud, you must provide an existing VPC network and subnets to host the cluster, and you must specify publish: Internal in your install-config.yaml file. The installation program must also be able to resolve the DNS records that the cluster requires. The installation program configures the Ingress Operator and API server for only internal traffic.
The cluster still requires access to internet to access the Google Cloud APIs.
The following items are not required or created when you install a private cluster:
- Public subnets
- Public network load balancers, which support public ingress
- A public DNS zone that matches the
baseDomainfor the cluster
The installation program does use the baseDomain that you specify to create a private DNS zone and the required records for the cluster. The cluster is configured so that the Operators do not create public records for the cluster and all cluster machines are placed in the private subnets that you specify.
Because it is not possible to limit access to external load balancers based on source tags, the private cluster uses only internal load balancers to allow access to internal instances.
The internal load balancer relies on instance groups rather than the target pools that the network load balancers use. The installation program creates instance groups for each zone, even if there is no instance in that group.
- The cluster IP address is internal only.
- One forwarding rule manages both the Kubernetes API and machine config server ports.
- The backend service consists of each zone’s instance group and, while it exists, the bootstrap instance group.
- The firewall uses a single rule that is based on only internal source ranges.
Limitations
No health check for the Machine config server, /healthz, runs because of a difference in load balancer functionality. Two internal load balancers cannot share a single IP address, but two network load balancers can share a single external IP address. Instead, the health of an instance is determined entirely by the /readyz check on port 6443.
About using a custom VPC
In OpenShift Container Platform 4.22, you can deploy a cluster into an existing VPC and subnets in Google Cloud to help avoid limit constraints in new accounts or to more easily abide by the operational constraints that your company’s guidelines set.
You must also use existing routing rules. This installation option is a good choice if you cannot obtain the infrastructure creation permissions that are required to create the VPC yourself.
Requirements for using your VPC
The installation program will no longer create the following components:
- VPC
- Subnets
- Cloud router
- Cloud NAT
- NAT IP addresses
If you use a custom VPC, you must correctly configure it and its subnets for the installation program and the cluster to use. The installation program cannot subdivide network ranges for the cluster to use, set route tables for the subnets, or set VPC options such as DHCP, so you must do so before you install the cluster.
Your VPC and subnets must meet the following characteristics:
- The VPC must be in the same Google Cloud project that you deploy the OpenShift Container Platform cluster to.
- To allow access to the internet from the control plane and compute machines, you must configure cloud NAT on the subnets to allow egress to it. These machines do not have a public address. Even if you do not require access to the internet, you must allow egress to the VPC network to obtain the installation program and images. Because multiple cloud NATs cannot be configured on the shared subnets, the installation program cannot configure it.
To ensure that the subnets that you provide are suitable, the installation program confirms the following data:
- All the subnets that you specify exist and belong to the VPC that you specified.
- The subnet CIDRs belong to the machine CIDR.
- You must provide a subnet to deploy the cluster control plane and compute machines to. You can use the same subnet for both machine types.
If you delete a cluster that uses an existing VPC, the VPC is not deleted.
Division of permissions
Starting with OpenShift Container Platform 4.3, you do not need all of the permissions that are required for an installation program-provisioned infrastructure cluster to deploy a cluster. This change mimics the division of permissions that you might have at your company: some individuals can create different resources in your clouds than others. For example, you might be able to create application-specific items, such as instances, buckets, and load balancers, but not networking-related components, such as VPCs, subnets, or Ingress rules.
The Google Cloud credentials that you use when you create your cluster do not need the networking permissions that are required to make VPCs and core networking components within the VPC, such as subnets, routing tables, internet gateways, NAT, and VPN. You still need permission to make the application resources that the machines within the cluster require, such as load balancers, security groups, storage, and nodes.
Isolation between clusters
If you deploy OpenShift Container Platform to an existing network, the isolation of cluster services is preserved by firewall rules that reference the machines in your cluster by the cluster’s infrastructure ID. Only traffic within the cluster is allowed.
If you deploy multiple clusters to the same VPC, the following components might share access between clusters:
- The API, which is globally available with an external publishing strategy or available throughout the network in an internal publishing strategy
- Debugging tools, such as ports on VM instances that are open to the machine CIDR for SSH and ICMP access
Internet access for OpenShift Container Platform
In OpenShift Container Platform 4.22, you require access to the internet 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.
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.
Generating a key pair for cluster node SSH access
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.
Do not skip this procedure in production environments, where disaster recovery and debugging is required.
You must use a local key, not one that you configured with platform-specific approaches.
Procedure
- 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~/.sshdirectory.NoteIf 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, ands390xarchitectures, do not create a key that uses theed25519algorithm. Instead, create a key that uses thersaorecdsaalgorithm. - View the public SSH key:terminal
$ cat <path>/<file_name>.pubFor example, run the following to view the
~/.ssh/id_ed25519.pubpublic key:terminal$ cat ~/.ssh/id_ed25519.pub - 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 gathercommand.NoteOn some distributions, default SSH private key identities such as
~/.ssh/id_rsaand~/.ssh/id_dsaare managed automatically.- If the
ssh-agentprocess is not already running for your local user, start it as a background task:terminal$ eval "$(ssh-agent -s)"Example outputAgent pid 31874NoteIf your cluster is in FIPS mode, only use FIPS-compliant algorithms to generate the SSH key. The key must be either RSA or ECDSA.
- If the
- 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.Example outputIdentity 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.
Obtaining the installation program
Before you install OpenShift Container Platform, download the installation file on the host you are using for installation, so that installation assets exist for deployment in your environment.
Prerequisites
- You have a computer that runs Linux or macOS, with 500 MB of local disk space.
Procedure
- Go to the Cluster Type page on the Red Hat Hybrid Cloud Console. If you have a Red Hat account, log in with your credentials. If you do not, create an account.
- Select your infrastructure provider from the Run it yourself section of the page.
- Select your host operating system and architecture from the dropdown menus under OpenShift Installer and click Download Installer.
- Place the downloaded file in the directory where you want to store the installation configuration files.Important
- The installation program creates several files on the computer that you use to install your cluster. You must keep the installation program and the files that the installation program creates after you finish installing the cluster. Both of the files are required to delete the cluster.
- Deleting the files created by the installation program does not remove your cluster, even if the cluster failed during installation. To remove your cluster, complete the OpenShift Container Platform uninstallation procedures for your specific cloud provider.
- Extract the installation program. For example, on a computer that uses a Linux operating system, run the following command:terminal
$ tar -xvf openshift-install-linux.tar.gz - Download your installation pull secret from Red Hat OpenShift Cluster Manager. This pull secret allows you to authenticate with the services that are provided by the included authorities, including Quay.io, which serves the container images for OpenShift Container Platform components.Tip
Alternatively, you can retrieve the installation program from the Red Hat Customer Portal, where you can specify a version of the installation program to download. However, you must have an active subscription to access this page.
Manually creating the installation configuration file
Installing the cluster requires that you manually create the installation configuration file.
Prerequisites
- You have an SSH public key on your local machine for use with the installation program. You can use the key for SSH authentication onto your cluster nodes for debugging and disaster recovery.
- You have obtained the OpenShift Container Platform installation program and the pull secret for your cluster.
Procedure
- Create an installation directory to store your required installation assets in:terminal
$ mkdir <installation_directory>ImportantYou must create a directory. Some installation assets, such as bootstrap X.509 certificates have short expiration intervals, so 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.
- Edit the
install-config.yamlfile to set thepublish: Internalparameter. - Edit the
install-config.yamlfile to set the parameters necessary for installation into an existing VPC.- Define the network and subnets for the VPC to install the cluster in under the parent
platform.gcpfield:yamlplatform: gcp: network: <existing_vpc> controlPlaneSubnet: <control_plane_subnet> computeSubnet: <compute_subnet>For the
platform.gcp.networkparameter, specify the name for the existing Google VPC. For theplatform.gcp.controlPlaneSubnetandplatform.gcp.computeSubnetparameters, specify the existing subnets to deploy the control plane machines and compute machines, respectively.
- Define the network and subnets for the VPC to install the cluster in under the parent
- Customize the provided sample
install-config.yamlfile template and save the file in the<installation_directory>.NoteYou must name this configuration file
install-config.yaml. - Back up the
install-config.yamlfile so that you can use it to install many clusters.ImportantBack up the
install-config.yamlfile now, because the installation process consumes the file in the next step.
Minimum resource requirements for cluster installation
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
| Machine | Operating system | vCPU | Virtual RAM | Storage | Input/Output Per Second (IOPS) |
|---|---|---|---|---|---|
| Bootstrap | RHCOS | 4 | 16 GB | 100 GB | 300 |
| Control plane | RHCOS | 4 | 16 GB | 100 GB | 300 |
| Compute | RHCOS | 2 | 8 GB | 100 GB | 300 |
- 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.
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 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.
Tested instance types for Google Cloud
OpenShift Container Platform supports specific Google Cloud instance types that have been validated for cluster deployment.
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 (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 (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:
A2A3C2C2DC3C3DC4E2M1N1N2N2DN4Tau T2D
Tested instance types for Google Cloud on 64-bit ARM infrastructures
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:
C4AN4ATau T2A
Using custom machine types
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.
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: 3Enabling Shielded VMs
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.
Shielded VMs are currently not supported on clusters with 64-bit ARM infrastructures.
Procedure
- Use a text editor to edit the
install-config.yamlfile before deploying your cluster and add one of the following stanzas:- To use shielded VMs for only control plane machines:yaml
controlPlane: platform: gcp: secureBoot: Enabled - To use shielded VMs for only compute machines:yaml
compute: - platform: gcp: secureBoot: Enabled - To use shielded VMs for all machines:yaml
platform: gcp: defaultMachinePlatform: secureBoot: Enabled
- To use shielded VMs for only control plane machines:
Enabling Confidential VMs
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. You can enable Confidential VMs and Shielded VMs at the same time, although they are not dependent on each other.
Confidential VMs are currently not supported on 64-bit ARM architectures.
Procedure
- Use a text editor to edit the
install-config.yamlfile before deploying your cluster and add one of the following stanzas:- To use confidential VMs for only control plane machines:yaml
controlPlane: platform: gcp: confidentialCompute: AMDEncryptedVirtualizationNestedPaging type: n2d-standard-8 onHostMaintenance: Terminatewhere:
confidentialComputeEnables 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".
typeSpecifies 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.
onHostMaintenanceSpecifies 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.
- To use confidential VMs for only compute machines:yaml
compute: - platform: gcp: confidentialCompute: AMDEncryptedVirtualizationNestedPaging type: n2d-standard-8 onHostMaintenance: Terminate - To use confidential VMs for all machines:yaml
platform: gcp: defaultMachinePlatform: confidentialCompute: AMDEncryptedVirtualizationNestedPaging type: n2d-standard-8 onHostMaintenance: Terminate
- To use confidential VMs for only control plane machines:
Enabling a user-managed DNS
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
jqpackage.
Procedure
- Before you deploy your cluster, use a text editor to open the
install-config.yamlfile and add the following stanza:- To enable user-managed DNS:yaml
platform: gcp: userProvisionedDNS: Enabledwhere:
EnabledEnables user-provisioned DNS management.
- To enable user-managed DNS:
Sample customized install-config.yaml file for Google Cloud
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.
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.
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-east1where:
controlPlaneSpecifies parameters that apply to control plane machines.
computeSpecifies parameters that apply to compute machines.
networkingSpecifies parameters that apply to the cluster networking configuration. If you do not provide networking values, the installation program provides default values.
platformSpecifies parameters that apply to the infrastructure platform that hosts the cluster.
Create an Ingress Controller with global access on Google Cloud
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.yamland complete any modifications to it.
Procedure
- 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 theinstall-config.yamlfile for your cluster. - Create a file that is named
cluster-ingress-default-ingresscontroller.yamlin the<installation_directory>/manifests/directory:terminal$ touch <installation_directory>/manifests/cluster-ingress-default-ingresscontroller.yamlFor
_<installation_directory>_, specify the directory name that contains themanifests/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.yamlExample outputcluster-ingress-default-ingresscontroller.yaml - Open the
cluster-ingress-default-ingresscontroller.yamlfile in an editor and enter a custom resource (CR) that describes the Operator configuration you want:Sample clientAccess configuration to GlobalapiVersion: 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: LoadBalancerServicegcp.clientAccessis set toGlobalto provide global access for the Ingress Controller.scopeis set toInternalbecause global access is available only to Ingress Controllers that use internal load balancers.
Configuring the cluster-wide proxy during installation
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.yamlfile. - 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
Proxyobject’sspec.noProxyfield to bypass the proxy if necessary.NoteThe
Proxyobjectstatus.noProxyfield includes the values of thenetworking.machineNetwork[].cidr,networking.clusterNetwork[].cidr, andnetworking.serviceNetwork[]fields from your installation configuration.For installations on Amazon Web Services (AWS), Google Cloud, Microsoft Azure, and Red Hat OpenStack Platform (RHOSP), the
Proxyobjectstatus.noProxyfield also includes the instance metadata endpoint (169.254.169.254).
Procedure
- Edit your
install-config.yamlfile and add the proxy settings. For example:yamlapiVersion: 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.httpProxySpecifies a proxy URL to use for creating HTTP connections outside the cluster. The URL scheme must be
http.proxy.httpsProxySpecifies a proxy URL to use for creating HTTPS connections outside the cluster.
proxy.noProxySpecifies 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.commatchesx.y.com, but noty.com. Use*to bypass the proxy for all destinations.additionalTrustBundleIf you specify this value, the installation program generates a config map named
user-ca-bundlein theopenshift-confignamespace to hold the additional CA certificates. If you specifyadditionalTrustBundleand at least one proxy setting, theProxyobject references theuser-ca-bundleconfig map in thetrustedCAfield. The Cluster Network Operator then creates atrusted-ca-bundleconfig map that merges the contents specified for thetrustedCAparameter with the RHCOS trust bundle. You must set theadditionalTrustBundlefield unless an authority from the RHCOS trust bundle signs the proxy’s identity certificate.additionalTrustBundlePolicySpecifies the policy that determines the configuration of the
Proxyobject to reference theuser-ca-bundleconfig map in thetrustedCAfield. The allowed values areProxyonlyandAlways. UseProxyonlyto reference theuser-ca-bundleconfig map only when you configure anhttp/httpsproxy. UseAlwaysto always reference theuser-ca-bundleconfig map. The default value isProxyonly. Optional parameter.
NoteThe installation program does not support the proxy
readinessEndpointsfield.NoteIf the installation program times out, restart and then complete the deployment by using the
wait-forcommand of the installation program. For example:terminal$ ./openshift-install wait-for install-complete --log-level debug - Save the file and reference it when installing OpenShift Container Platform.
The installation program creates a cluster-wide proxy named
clusterthat uses the proxy settings in theinstall-config.yamlfile. If you do not give proxy settings, the installation program still creates aclusterProxyobject, but it has a nilspec.NoteOnly the
Proxyobject namedclusteris supported, and you cannot create additional proxies.
Installing the OpenShift CLI on Linux
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.
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
- Navigate to the Download OpenShift Container Platform page on the Red Hat Customer Portal.
- Select the architecture from the Product Variant list.
- Select the appropriate version from the Version list.
- Click Download Now next to the OpenShift v4.22 Linux Clients entry and save the file.
- Unpack the archive:terminal
$ tar xvf <file> - Place the
ocbinary in a directory that is on yourPATH.To check your
PATH, run the following command:terminal$ echo $PATH
Verification
- After you install the OpenShift CLI, it is available using the
occommand:terminal$ oc <command>
Installing the OpenShift CLI on Windows
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.
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
- Navigate to the Download OpenShift Container Platform page on the Red Hat Customer Portal.
- Select the appropriate version from the Version list.
- Click Download Now next to the OpenShift v4.22 Windows Client entry and save the file.
- Extract the archive with a ZIP program.
- Move the
ocbinary to a directory that is on yourPATHvariable.To check your
PATHvariable, open the Command Prompt and run the following command:terminalC:\> path
Verification
- After you install the OpenShift CLI, it is available using the
occommand:terminalC:\> oc <command>
Installing the OpenShift CLI on macOS
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.
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
- Navigate to the Download OpenShift Container Platform page on the Red Hat Customer Portal.
- Select the architecture from the Product Variant list.
- Select the appropriate version from the Version list.
- 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.
- Extract the archive.
- Move the
ocbinary to a directory on yourPATHvariable.To check your
PATHvariable, open a terminal and run the following command:terminal$ echo $PATH
Verification
- Verify your installation by using an
occommand:terminal$ oc <command>
Alternatives to storing administrator-level secrets in the kube-system project
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
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
- 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
- If you did not set the
credentialsModeparameter in theinstall-config.yamlconfiguration file toManual, modify the value as shown:Sample configuration file snippetapiVersion: v1 baseDomain: example.com credentialsMode: Manual # ... - 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. - Set a
$RELEASE_IMAGEvariable with the release image from your installation file by running the following command:terminal$ RELEASE_IMAGE=$(./openshift-install version | awk '/release image/ {print $3}') - Extract the list of
CredentialsRequestcustom 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:
--includedSpecifies only the manifests that your specific cluster configuration requires.
<path_to_directory_with_installation_configuration>Specifies the location of the
install-config.yamlfile.<path_to_directory_for_credentials_requests>Specifies the path to the directory where you want to store the
CredentialsRequestobjects. If the specified directory does not exist, this command creates it. This command creates a YAML file for eachCredentialsRequestobject.
Sample CredentialsRequest objectapiVersion: 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 ... - Create YAML files for secrets in the
openshift-installmanifests directory that you generated previously. The secrets must be stored using the namespace and secret name defined in thespec.secretReffor eachCredentialsRequestobject.Sample CredentialsRequest object with secretsapiVersion: 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> ...Sample Secret objectapiVersion: v1 kind: Secret metadata: name: <component_secret> namespace: <component_namespace> data: service_account.json: <base64_encoded_gcp_service_account_file>ImportantBefore 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
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
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.
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
ccoctlutility uses:- The IAM Workload Identity Pool Admin role
- The following granular permissions:
compute.projects.getiam.googleapis.com/workloadIdentityPoolProviders.createiam.googleapis.com/workloadIdentityPoolProviders.getiam.googleapis.com/workloadIdentityPools.createiam.googleapis.com/workloadIdentityPools.deleteiam.googleapis.com/workloadIdentityPools.getiam.googleapis.com/workloadIdentityPools.undeleteiam.roles.createiam.roles.deleteiam.roles.listiam.roles.undeleteiam.roles.updateiam.serviceAccounts.createiam.serviceAccounts.deleteiam.serviceAccounts.getIamPolicyiam.serviceAccounts.listiam.serviceAccounts.setIamPolicyiam.workloadIdentityPoolProviders.getiam.workloadIdentityPools.deleteresourcemanager.projects.getresourcemanager.projects.getIamPolicyresourcemanager.projects.setIamPolicystorage.buckets.createstorage.buckets.deletestorage.buckets.getstorage.buckets.getIamPolicystorage.buckets.setIamPolicystorage.objects.createstorage.objects.deletestorage.objects.list
Procedure
- 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}') - 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)NoteEnsure that the architecture of the
$RELEASE_IMAGEmatches the architecture of the environment in which you will use theccoctltool. - Extract the
ccoctlbinary 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-secretFor
<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.rhel8is 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.NoteThe
ccoctlbinary is created in the directory from where you executed the command and not in/usr/bin/. You must rename the directory or move theccoctl.<rhel_version>binary toccoctl.
- Change the permissions to make
ccoctlexecutable by running the following command:terminal$ chmod 775 ccoctl
Verification
- To verify that
ccoctlis ready to use, display the help file. Use a relative file name when you run the command, for example:terminal$ ./ccoctlExample outputOpenShift 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
You can use the ccoctl gcp create-all command to automate the creation of Google Cloud resources.
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
ccoctlbinary.
Procedure
- Set a
$RELEASE_IMAGEvariable with the release image from your installation file by running the following command:terminal$ RELEASE_IMAGE=$(./openshift-install version | awk '/release image/ {print $3}') - Extract the list of
CredentialsRequestobjects 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:
--includedSpecifies to include only the manifests that your specific cluster configuration requires.
<path_to_directory_with_installation_configuration>Specifies the location of the
install-config.yamlfile.<path_to_directory_for_credentials_requests>Specifies the path to the directory where you want to store the
CredentialsRequestobjects. If the specified directory does not exist, this command creates it.
NoteThis command might take a few moments to run.
- Use the
ccoctltool to process allCredentialsRequestobjects 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
CredentialsRequestmanifests to create Google Cloud service accounts.<key_storage_method>Specifies the method for storing OIDC JWK files. Accepted values are
public-bucketandpool-jwk-file. The default valuepublic-bucketcreates a public GCS bucket to host the OIDC configuration and JWK files. Thepool-jwk-filevalue attaches the JWK directly to the workload identity pool provider without creating a public bucket. This parameter is optional.
NoteIf your cluster uses Technology Preview features that are enabled by the
TechPreviewNoUpgradefeature set, you must include the--enable-tech-previewparameter.
Verification
- To verify that the OpenShift Container Platform secrets are created, list the files in the
<path_to_ccoctl_output_dir>/manifestsdirectory:terminal$ ls <path_to_ccoctl_output_dir>/manifestsExample outputcluster-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.yamlYou 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
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.
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
ccoctlutility to create the cloud provider resources for your cluster. - You have access to your
install-config.yamlfile. - You have logged in to the Google Cloud CLI (
gcloud) as a user with permissions to manage service accounts and roles.
Procedure
- Obtain the following values from your
install-config.yamlfile:- The Google Cloud project name. In the YAML file, this is the value of the
platform.gcp.projectIDparameter. - The cluster name. In the YAML file, this is the value of the
metadata.nameparameter. - The service account for the compute nodes. In the YAML file, this is the value of the
compute[0].platform.gcp.serviceAccountparameter.
- The Google Cloud project name. In the YAML file, this is the value of the
- Obtain the service account for the Machine API controller that the
ccoctlutility 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 themetadata.nameparameter in yourinstall-config.yamlfile. - 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. - 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.Example outputetag: <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-gcpwhere
<project_name>is the Google Cloud project name specified in theinstall-config.yamlfile.NoteThis truncated example output might not match the permissions list for your cluster.
- Create a custom role that includes all of the permissions from your output except for the
iam.serviceAccounts.actAspermission 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.listIn this example, the new role name is the original custom role name,
<machine_api_role>, with a_without_actasstring added to the end.ImportantThis 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. - Remove the custom role that includes the
iam.serviceAccounts.actAspermission 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. - Grant the custom role that excludes the
iam.serviceAccounts.actAspermission 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_actaswhere
<machine_api_role>_without_actasis the new custom role. - 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>"Example outputROLE projects/<project_name>/roles/<machine_api_role>_without_actas - 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.serviceAccountUserwhere
<compute_nodes_service_account>is the service account for your compute nodes. This value is thecompute[0].platform.gcp.serviceAccountparameter in yourinstall-config.yamlfile.
Incorporating the Cloud Credential Operator utility manifests
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
ccoctlutility.
Procedure
- 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
- If you did not set the
credentialsModeparameter in theinstall-config.yamlconfiguration file toManual, modify the value as shown:Sample configuration file snippetapiVersion: v1 baseDomain: example.com credentialsMode: Manual # ... - 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. - Copy the manifests that the
ccoctlutility generated to themanifestsdirectory that the installation program created by running the following command:terminal$ cp /<path_to_ccoctl_output_dir>/manifests/* ./manifests/ - Copy the
tlsdirectory that contains the private key to the installation directory:terminal$ cp -a /<path_to_ccoctl_output_dir>/tls .
Deploying the cluster
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.
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
- 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, orGCLOUD_KEYFILE_JSONenvironment variables - The
~/.gcp/osServiceAccount.jsonfile - The
gcloud clidefault credentials
- The
- In the directory that contains the installation program, initialize the cluster deployment by running the following command:
$ ./openshift-install create cluster --dir <installation_directory> \
--log-level=infowhere:
<installation_directory>: Specifies the location of your customized./install-config.yamlfile.--log-level: Specifies the log level. To view different installation details, specifywarn,debug, orerrorinstead ofinfo.
- Optional: You can reduce the number of permissions for the service account that you used to install the cluster.
- If you assigned the
Ownerrole to your service account, you can remove that role and replace it with theViewerrole. - If you included the
Service Account Key Adminrole, you can remove it.
- If you assigned the
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
kubeadminuser. - Credential information also outputs to
<installation_directory>/.openshift_install.log.ImportantDo 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: 36m22sImportant- 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-bootstrappercertificate 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.
- 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
Provisioning your own DNS records
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.
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
gcloudCLI tool.
Procedure
- 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.
- Find the IP address of the API server:
- 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 .IPAddresswhere:
<project_name>Specifies the name of your Google Cloud project.
<region_name>Specifies the region where you installed your cluster.
- 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
- If you installed a private cluster, determine the IP address of the API server by running the following command:
- 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. - Find the IP address of the Ingress service:
- 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.
- If you installed a public cluster, find the IP address by using the forwarding rule:
- 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) - 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 .IPAddresswhere:
<region_name>Specifies the region where you installed your cluster.
- Find the forwarding rule for the Ingress service by running the following command:
- If you installed a private cluster, find the IP address of the Ingress service by running the following command:
- 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.
Logging in to the cluster by using the CLI
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
- Export the
kubeadmincredentials by running the following command:terminal$ export KUBECONFIG=<installation_directory>/auth/kubeconfigwhere:
<installation_directory>Specifies the path to the directory that stores the installation files.
- Verify you can run
occommands successfully using the exported configuration by running the following command:terminal$ oc whoamiExample outputsystem:admin
Next steps
- "Customize your cluster"
- "Remote health reporting"
Telemetry access for OpenShift Container Platform
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.
After you confirm that your OpenShift Cluster Manager 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.