Installing a cluster on oVirt with customizations

You can customize and install an OKD cluster on oVirt, similar to the one shown in the following diagram.

Diagram of an OKD cluster on a oVirt cluster

The installation program uses installer-provisioned infrastructure to automate creating and deploying the cluster.

To install a customized cluster, you prepare the environment and perform the following steps:

  1. Create an installation configuration file, the install-config.yaml file, by running the installation program and answering its prompts.

  2. Inspect and modify parameters in the install-config.yaml file.

  3. Make a working copy of the install-config.yaml file.

  4. Run the installation program with a copy of the install-config.yaml file.

Then, the installation program creates the OKD cluster.

For an alternative to installing a customized cluster, see Installing a default cluster.

This installation program is available for Linux and macOS only.

Prerequisites

Requirements for the oVirt environment

To install and run an OKD version 4.7 cluster, the oVirt environment must meet the following requirements.

Not meeting these requirements can cause the installation or process to fail. Additionally, not meeting these requirements can cause the OKD cluster to fail days or weeks after installation.

The following requirements for CPU, memory, and storage resources are based on default values multiplied by the default number of virtual machines the installation program creates. These resources must be available in addition to what the oVirt environment uses for non-OKD operations.

By default, the installation program creates seven virtual machines during the installation process. First, it creates a bootstrap virtual machine to provide temporary services and a control plane while it creates the rest of the OKD cluster. When the installation program finishes creating the cluster, deleting the bootstrap machine frees up its resources.

If you increase the number of virtual machines in the oVirt environment, you must increase the resources accordingly.

Requirements

  • The oVirt version is 4.4.

  • The oVirt environment has one data center whose state is Up.

  • The oVirt data center contains an oVirt cluster.

  • The oVirt cluster has the following resources exclusively for the OKD cluster:

    • Minimum 28 vCPUs: four for each of the seven virtual machines created during installation.

    • 112 GiB RAM or more, including:

      • 16 GiB or more for the bootstrap machine, which provides the temporary control plane.

      • 16 GiB or more for each of the three control plane machines which provide the control plane.

      • 16 GiB or more for each of the three compute machines, which run the application workloads.

  • The oVirt storage domain must meet these etcd backend performance requirements.

  • In production environments, each virtual machine must have 120 GiB or more. Therefore, the storage domain must provide 840 GiB or more for the default OKD cluster. In resource-constrained or non-production environments, each virtual machine must have 32 GiB or more, so the storage domain must have 230 GiB or more for the default OKD cluster.

  • To download images from the Red Hat Ecosystem Catalog during installation and update procedures, the oVirt cluster must have access to an internet connection. The Telemetry service also needs an internet connection to simplify the subscription and entitlement process.

  • The oVirt cluster must have a virtual network with access to the REST API on the oVirt Engine. Ensure that DHCP is enabled on this network, because the VMs that the installer creates obtain their IP address by using DHCP.

  • A user account and group with the following least privileges for installing and managing an OKD cluster on the target oVirt cluster:

    • DiskOperator

    • DiskCreator

    • UserTemplateBasedVm

    • TemplateOwner

    • TemplateCreator

    • ClusterAdmin on the target cluster

Apply the principle of least privilege: Avoid using an administrator account with SuperUser privileges on oVirt during the installation process. The installation program saves the credentials you provide to a temporary ovirt-config.yaml file that might be compromised.

Verifying the requirements for the oVirt environment

Verify that the oVirt environment meets the requirements to install and run an OKD cluster. Not meeting these requirements can cause failures.

These requirements are based on the default resources the installation program uses to create control plane and compute machines. These resources include vCPUs, memory, and storage. If you change these resources or increase the number of OKD machines, adjust these requirements accordingly.

Procedure

  1. Check that the oVirt version supports installation of OKD version 4.7.

    1. In the oVirt Administration Portal, click the ? help icon in the upper-right corner and select About.

    2. In the window that opens, make a note of the oVirt Software Version.

    3. Confirm that the oVirt version is 4.4. For more information about supported version combinations, see Support Matrix for OKD on oVirt.

  2. Inspect the data center, cluster, and storage.

    1. In the oVirt Administration Portal, click ComputeData Centers.

    2. Confirm that the data center where you plan to install OKD is accessible.

    3. Click the name of that data center.

    4. In the data center details, on the Storage tab, confirm the storage domain where you plan to install OKD is Active.

    5. Record the Domain Name for use later on.

    6. Confirm Free Space has at least 230 GiB.

    7. Confirm that the storage domain meets these etcd backend performance requirements, which you can measure by using the fio performance benchmarking tool.

    8. In the data center details, click the Clusters tab.

    9. Find the oVirt cluster where you plan to install OKD. Record the cluster name for use later on.

  3. Inspect the oVirt host resources.

    1. In the oVirt Administration Portal, click Compute > Clusters.

    2. Click the cluster where you plan to install OKD.

    3. In the cluster details, click the Hosts tab.

    4. Inspect the hosts and confirm they have a combined total of at least 28 Logical CPU Cores available exclusively for the OKD cluster.

    5. Record the number of available Logical CPU Cores for use later on.

    6. Confirm that these CPU cores are distributed so that each of the seven virtual machines created during installation can have four cores.

    7. Confirm that, all together, the hosts have 112 GiB of Max free Memory for scheduling new virtual machines distributed to meet the requirements for each of the following OKD machines:

      • 16 GiB required for the bootstrap machine

      • 16 GiB required for each of the three control plane machines

      • 16 GiB for each of the three compute machines

    8. Record the amount of Max free Memory for scheduling new virtual machines for use later on.

  4. Verify that the virtual network for installing OKD has access to the oVirt Engine’s REST API. From a virtual machine on this network, use curl to reach the oVirt Engine’s REST API:

    1. $ curl -k -u <username>@<profile>:<password> \ (1)
    2. https://<engine-fqdn>/ovirt-engine/api (2)
    1For <username>, specify the user name of an oVirt account with privileges to create and manage an OKD cluster on oVirt. For <profile>, specify the login profile, which you can get by going to the oVirt Administration Portal login page and reviewing the Profile dropdown list. For <password>, specify the password for that user name.
    2For <engine-fqdn>, specify the fully qualified domain name of the oVirt environment.

    For example:

    1. $ curl -k -u ocpadmin@internal:pw123 \
    2. https://ovirtlab.example.com/ovirt-engine/api

Preparing the network environment on oVirt

Configure two static IP addresses for the OKD cluster and create DNS entries using these addresses.

Procedure

  1. Reserve two static IP addresses

    1. On the network where you plan to install OKD, identify two static IP addresses that are outside the DHCP lease pool.

    2. Connect to a host on this network and verify that each of the IP addresses is not in use. For example, use Address Resolution Protocol (ARP) to check that none of the IP addresses have entries:

      1. $ arp 10.35.1.19

      Example output

      1. 10.35.1.19 (10.35.1.19) -- no entry
    3. Reserve two static IP addresses following the standard practices for your network environment.

    4. Record these IP addresses for future reference.

  2. Create DNS entries for the OKD REST API and apps domain names using this format:

    1. api.<cluster-name>.<base-domain> <ip-address> (1)
    2. *.apps.<cluster-name>.<base-domain> <ip-address> (2)
    1For <cluster-name>, <base-domain>, and <ip-address>, specify the cluster name, base domain, and static IP address of your OKD API.
    2Specify the cluster name, base domain, and static IP address of your OKD apps for Ingress and the load balancer.

    For example:

    1. api.my-cluster.virtlab.example.com 10.35.1.19
    2. *.apps.my-cluster.virtlab.example.com 10.35.1.20

Installing OKD on oVirt in insecure mode

By default, the installer creates a CA certificate, prompts you for confirmation, and stores the certificate to use during installation. You do not need to create or install one manually.

Although it is not recommended, you can override this functionality and install OKD without verifying a certificate by installing OKD on oVirt in insecure mode.

Installing in insecure mode is not recommended, because it enables a potential attacker to perform a Man-in-the-Middle attack and capture sensitive credentials on the network.

Procedure

  1. Create a file named ~/.ovirt/ovirt-config.yaml.

  2. Add the following content to ovirt-config.yaml:

    1. ovirt_url: \https://ovirt.example.com/ovirt-engine/api
    2. ovirt_fqdn: ovirt.example.com
    3. ovirt_pem_url: ""
    4. ovirt_username: ocpadmin@internal
    5. ovirt_password: super-secret-password
    6. ovirt_insecure: true
  3. Run the installer.

Generating an SSH private key and adding it to the agent

If you want to perform installation debugging or disaster recovery on your cluster, you must provide an SSH key to both your ssh-agent and the installation program. You can use this key to access the bootstrap machine in a public cluster to troubleshoot installation issues.

In a production environment, you require disaster recovery and debugging.

You can use this key to SSH into the master nodes as the user core. When you deploy the cluster, the key is added to the core user’s ~/.ssh/authorized_keys list.

On clusters running Fedora CoreOS (FCOS), the SSH keys specified in the Ignition config files are written to the /home/core/.ssh/authorized_keys.d/core file. However, the Machine Config Operator manages SSH keys in the /home/core/.ssh/authorized_keys file and configures sshd to ignore the /home/core/.ssh/authorized_keys.d/core file. As a result, newly provisioned OKD nodes are not accessible using SSH until the Machine Config Operator reconciles the machine configs with the authorized_keys file. After you can access the nodes using SSH, you can delete the /home/core/.ssh/authorized_keys.d/core file.

Procedure

  1. If you do not have an SSH key that is configured for password-less authentication on your computer, create one. For example, on a computer that uses a Linux operating system, run the following command:

    1. $ ssh-keygen -t ed25519 -N '' \
    2. -f <path>/<file_name> (1)
    1Specify the path and file name, such as ~/.ssh/id_rsa, of the new SSH key. If you have an existing key pair, ensure your public key is in the your ~/.ssh directory.

    Running this command generates an SSH key that does not require a password in the location that you specified.

    If you plan to install an OKD cluster that uses FIPS Validated / Modules in Process cryptographic libraries on the x86_64 architecture, do not create a key that uses the ed25519 algorithm. Instead, create a key that uses the rsa or ecdsa algorithm.

  2. Start the ssh-agent process as a background task:

    1. $ eval "$(ssh-agent -s)"

    Example output

    1. Agent pid 31874

    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.

  3. Add your SSH private key to the ssh-agent:

    1. $ ssh-add <path>/<file_name> (1)

    Example output

    1. Identity added: /home/<you>/<path>/<file_name> (<computer_name>)
    1Specify the path and file name for your SSH private key, such as ~/.ssh/id_rsa

Next steps

  • When you install OKD, provide the SSH public key to the installation program.

Obtaining the installation program

Before you install OKD, download the installation file on a local computer.

Prerequisites

  • You have a computer that runs Linux or macOS, with 500 MB of local disk space

Procedure

  1. Download installer from https://github.com/openshift/okd/releases

    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 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 OKD uninstallation procedures for your specific cloud provider.

  2. Extract the installation program. For example, on a computer that uses a Linux operating system, run the following command:

    1. $ tar xvf openshift-install-linux.tar.gz
  3. From the Pull Secret page on the Red Hat OpenShift Cluster Manager site, download your installation pull secret as a .txt file. 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 OKD components.

    Using a pull secret from the Red Hat OpenShift Cluster Manager site is not required. You can use a pull secret for another private registry. Or, if you do not need the cluster to pull images from a private registry, you can use {"auths":{"fake":{"auth":"aWQ6cGFzcwo="}}} as the pull secret when prompted during the installation.

    If you do not use the pull secret from the Red Hat OpenShift Cluster Manager site:

    • Red Hat Operators are not available.

    • The Telemetry and Insights operators do not send data to Red Hat.

    • Content from the Red Hat Container Catalog registry, such as image streams and Operators, are not available.

Creating the installation configuration file

You can customize the OKD cluster you install on oVirt.

Prerequisites

  • Obtain the OKD installation program and the pull secret for your cluster.

  • Obtain service principal permissions at the subscription level.

Procedure

  1. Create the install-config.yaml file.

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

      1. $ ./openshift-install create install-config --dir=<installation_directory> (1)
      1For <installation_directory>, specify the directory name to store the files that the installation program creates.

      Specify an empty directory. Some installation assets, like 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 OKD version.

    2. Respond to the installation program prompts.

      1. For SSH Public Key, select a password-less public key, such as ~/.ssh/id_rsa.pub. This key authenticates connections with the new OKD cluster.

        For production OKD clusters on which you want to perform installation debugging or disaster recovery, select an SSH key that your ssh-agent process uses.

      2. For Platform, select ovirt.

      3. For Enter oVirt’s API endpoint URL, enter the URL of the oVirt API using this format:

        1. https://<engine-fqdn>/ovirt-engine/api (1)
        1For <engine-fqdn>, specify the fully qualified domain name of the oVirt environment.

        For example:

        1. $ curl -k -u ocpadmin@internal:pw123 \
        2. https://ovirtlab.example.com/ovirt-engine/api
      4. For Is the oVirt CA trusted locally?, enter Yes, because you have already set up a CA certificate. Otherwise, enter No.

      5. For oVirt’s CA bundle, if you entered Yes for the preceding question, copy the certificate content from /etc/pki/ca-trust/source/anchors/ca.pem and paste it here. Then, press Enter twice. Otherwise, if you entered No for the preceding question, this question does not appear.

      6. For oVirt engine username, enter the user name and profile of the oVirt administrator using this format:

        1. <username>@<profile> (1)
        1For <username>, specify the user name of an oVirt administrator. For <profile>, specify the login profile, which you can get by going to the oVirt Administration Portal login page and reviewing the Profile dropdown list. Together, the user name and profile should look similar to this example:
        1. ocpadmin@internal
      7. For oVirt engine password, enter the oVirt admin password.

      8. For oVirt cluster, select the cluster for installing OKD.

      9. For oVirt storage domain, select the storage domain for installing OKD.

      10. For oVirt network, select a virtual network that has access to the oVirt Engine REST API.

      11. For Internal API Virtual IP, enter the static IP address you set aside for the cluster’s REST API.

      12. For Ingress virtual IP, enter the static IP address you reserved for the wildcard apps domain.

      13. For Base Domain, enter the base domain of the OKD cluster. If this cluster is exposed to the outside world, this must be a valid domain recognized by DNS infrastructure. For example, enter: virtlab.example.com

      14. For Cluster Name, enter the name of the cluster. For example, my-cluster. Use cluster name from the externally registered/resolvable DNS entries you created for the OKD REST API and apps domain names. The installation program also gives this name to the cluster in the oVirt environment.

      15. For Pull Secret, copy the pull secret from the pull-secret.txt file you downloaded earlier and paste it here. You can also get a copy of the same pull secret from the Pull Secret page on the Red Hat OpenShift Cluster Manager site.

  1. Modify the install-config.yaml file. You can find more information about the available parameters in the “Installation configuration parameters” section.

    If you have any intermediate CA certificates on the Engine, verify that the certificates appear in the ovirt-config.yaml file and the install-config.yaml file. If they do not appear, add them as follows:

    1. In the ~/.ovirt/ovirt-config.yaml file:

      1. [ovirt_ca_bundle]: |
      2. ——-BEGIN CERTIFICATE——-
      3. <MY_TRUSTED_CA>
      4. ——-END CERTIFICATE——-
      5. ——-BEGIN CERTIFICATE——-
      6. <INTERMEDIATE_CA>
      7. ——-END CERTIFICATE——-
    2. In the install-config.yaml file:

      1. [additionalTrustBundle]: |
      2. ——-BEGIN CERTIFICATE——-
      3. <MY_TRUSTED_CA>
      4. ——-END CERTIFICATE——-
      5. ——-BEGIN CERTIFICATE——-
      6. <INTERMEDIATE_CA>
      7. ——-END CERTIFICATE——-
  2. Back up the install-config.yaml file so that you can use it to install multiple clusters.

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

Example install-config.yaml files for oVirt

You can customize the OKD cluster the installation program creates by changing the parameters and parameter values in the install-config.yaml file.

The following example is specific to installing OKD on oVirt.

This file is located in the <installation_directory> you specified when you ran the following command.

  1. $ ./openshift-install create install-config --dir=<installation_directory>
  • These example files are provided for reference only. You must obtain your install-config.yaml file by using the installation program.

  • Changing the install-config.yaml file can increase the resources your cluster requires. Verify that your oVirt environment has those additional resources. Otherwise, the installation or cluster will fail.

Example: This is the default install-config.yaml file

  1. apiVersion: v1
  2. baseDomain: example.com
  3. compute:
  4. - architecture: amd64
  5. hyperthreading: Enabled
  6. name: worker
  7. platform: {}
  8. replicas: 3
  9. controlPlane:
  10. architecture: amd64
  11. hyperthreading: Enabled
  12. name: master
  13. platform: {}
  14. replicas: 3
  15. metadata:
  16. creationTimestamp: null
  17. name: my-cluster
  18. networking:
  19. clusterNetwork:
  20. - cidr: 10.128.0.0/14
  21. hostPrefix: 23
  22. machineNetwork:
  23. - cidr: 10.0.0.0/16
  24. networkType: OVNKubernetes
  25. serviceNetwork:
  26. - 172.30.0.0/16
  27. platform:
  28. ovirt:
  29. api_vip: 10.46.8.230
  30. ingress_vip: 192.168.1.5
  31. ovirt_cluster_id: 68833f9f-e89c-4891-b768-e2ba0815b76b
  32. ovirt_storage_domain_id: ed7b0f4e-0e96-492a-8fff-279213ee1468
  33. ovirt_network_name: ovirtmgmt
  34. vnicProfileID: 3fa86930-0be5-4052-b667-b79f0a729692
  35. publish: External
  36. pullSecret: '{"auths": ...}'
  37. sshKey: ssh-ed12345 AAAA...

Example: A minimal install-config.yaml file

  1. apiVersion: v1
  2. baseDomain: example.com
  3. metadata:
  4. name: test-cluster
  5. platform:
  6. ovirt:
  7. api_vip: 10.46.8.230
  8. ingress_vip: 10.46.8.232
  9. ovirt_cluster_id: 68833f9f-e89c-4891-b768-e2ba0815b76b
  10. ovirt_storage_domain_id: ed7b0f4e-0e96-492a-8fff-279213ee1468
  11. ovirt_network_name: ovirtmgmt
  12. vnicProfileID: 3fa86930-0be5-4052-b667-b79f0a729692
  13. pullSecret: '{"auths": ...}'
  14. sshKey: ssh-ed12345 AAAA...

Example: Custom machine pools in an install-config.yaml file

  1. apiVersion: v1
  2. baseDomain: example.com
  3. controlPlane:
  4. name: master
  5. platform:
  6. ovirt:
  7. cpu:
  8. cores: 4
  9. sockets: 2
  10. memoryMB: 65536
  11. osDisk:
  12. sizeGB: 100
  13. vmType: server
  14. replicas: 3
  15. compute:
  16. - name: worker
  17. platform:
  18. ovirt:
  19. cpu:
  20. cores: 4
  21. sockets: 4
  22. memoryMB: 65536
  23. osDisk:
  24. sizeGB: 200
  25. vmType: server
  26. replicas: 5
  27. metadata:
  28. name: test-cluster
  29. platform:
  30. ovirt:
  31. api_vip: 10.46.8.230
  32. ingress_vip: 10.46.8.232
  33. ovirt_cluster_id: 68833f9f-e89c-4891-b768-e2ba0815b76b
  34. ovirt_storage_domain_id: ed7b0f4e-0e96-492a-8fff-279213ee1468
  35. ovirt_network_name: ovirtmgmt
  36. vnicProfileID: 3fa86930-0be5-4052-b667-b79f0a729692
  37. pullSecret: '{"auths": ...}'
  38. sshKey: ssh-ed25519 AAAA...

Installation configuration parameters

Before you deploy an OKD cluster, you provide parameter values to describe your account on the cloud platform that hosts your cluster and optionally customize your cluster’s platform. When you create the install-config.yaml installation configuration file, you provide values for the required parameters through the command line. If you customize your cluster, you can modify the install-config.yaml file to provide more details about the platform.

After installation, you cannot modify these parameters in the install-config.yaml file.

The openshift-install command does not validate field names for parameters. If an incorrect name is specified, the related file or object is not created, and no error is reported. Ensure that the field names for any parameters that are specified are correct.

Required configuration parameters

Required installation configuration parameters are described in the following table:

Table 1. Required parameters
ParameterDescriptionValues

apiVersion

The API version for the install-config.yaml content. The current version is v1. The installer may also support older API versions.

String

baseDomain

The base domain of your cloud provider. The base domain is used to create routes to your OKD cluster components. The full DNS name for your cluster is a combination of the baseDomain and metadata.name parameter values that uses the <metadata.name>.<baseDomain> format.

A fully-qualified domain or subdomain name, such as example.com.

metadata

Kubernetes resource ObjectMeta, from which only the name parameter is consumed.

Object

metadata.name

The name of the cluster. DNS records for the cluster are all subdomains of {{.metadata.name}}.{{.baseDomain}}.

String of lowercase letters, hyphens (-), and periods (.), such as dev.

platform

The configuration for the specific platform upon which to perform the installation: aws, baremetal, azure, openstack, ovirt, vsphere. For additional information about platform.<platform> parameters, consult the table for your specific platform that follows.

Object

Network configuration parameters

You can customize your installation configuration based on the requirements of your existing network infrastructure. For example, you can expand the IP address block for the cluster network or provide different IP address blocks than the defaults.

Only IPv4 addresses are supported.

Table 2. Network parameters
ParameterDescriptionValues

networking

The configuration for the cluster network.

Object

You cannot modify parameters specified by the networking object after installation.

networking.networkType

The cluster network provider Container Network Interface (CNI) plug-in to install.

Either OpenShiftSDN or OVNKubernetes. The default value is OVNKubernetes.

networking.clusterNetwork

The IP address blocks for pods.

The default value is 10.128.0.0/14 with a host prefix of /23.

If you specify multiple IP address blocks, the blocks must not overlap.

An array of objects. For example:

  1. networking:
  2. clusterNetwork:
  3. - cidr: 10.128.0.0/14
  4. hostPrefix: 23

networking.clusterNetwork.cidr

Required if you use networking.clusterNetwork. An IP address block.

An IPv4 network.

An IP address block in Classless Inter-Domain Routing (CIDR) notation. The prefix length for an IPv4 block is between 0 and 32.

networking.clusterNetwork.hostPrefix

The subnet prefix length to assign to each individual node. For example, if hostPrefix is set to 23 then each node is assigned a /23 subnet out of the given cidr. A hostPrefix value of 23 provides 510 (2^(32 - 23) - 2) pod IP addresses.

A subnet prefix.

The default value is 23.

networking.serviceNetwork

The IP address block for services. The default value is 172.30.0.0/16.

The OpenShift SDN and OVN-Kubernetes network providers support only a single IP address block for the service network.

An array with an IP address block in CIDR format. For example:

  1. networking:
  2. serviceNetwork:
  3. - 172.30.0.0/16

networking.machineNetwork

The IP address blocks for machines.

If you specify multiple IP address blocks, the blocks must not overlap.

An array of objects. For example:

  1. networking:
  2. machineNetwork:
  3. - cidr: 10.0.0.0/16

networking.machineNetwork.cidr

Required if you use networking.machineNetwork. An IP address block. The default value is 10.0.0.0/16 for all platforms other than libvirt. For libvirt, the default value is 192.168.126.0/24.

An IP network block in CIDR notation.

For example, 10.0.0.0/16.

Set the networking.machineNetwork to match the CIDR that the preferred NIC resides in.

Optional configuration parameters

Optional installation configuration parameters are described in the following table:

Table 3. Optional parameters
ParameterDescriptionValues

additionalTrustBundle

A PEM-encoded X.509 certificate bundle that is added to the nodes’ trusted certificate store. This trust bundle may also be used when a proxy has been configured.

String

compute

The configuration for the machines that comprise the compute nodes.

Array of MachinePool objects. For details, see the following “Machine-pool” table.

compute.architecture

Determines the instruction set architecture of the machines in the pool. Currently, heteregeneous clusters are not supported, so all pools must specify the same architecture. Valid values are amd64 (the default).

String

compute.hyperthreading

Whether to enable or disable simultaneous multithreading, or hyperthreading, on compute machines. By default, simultaneous multithreading is enabled to increase the performance of your machines’ cores.

If you disable simultaneous multithreading, ensure that your capacity planning accounts for the dramatically decreased machine performance.

Enabled or Disabled

compute.name

Required if you use compute. The name of the machine pool.

worker

compute.platform

Required if you use compute. Use this parameter to specify the cloud provider to host the worker machines. This parameter value must match the controlPlane.platform parameter value.

aws, azure, gcp, openstack, ovirt, vsphere, or {}

compute.replicas

The number of compute machines, which are also known as worker machines, to provision.

A positive integer greater than or equal to 2. The default value is 3.

controlPlane

The configuration for the machines that comprise the control plane.

Array of MachinePool objects. For details, see the following “Machine-pool” table.

controlPlane.architecture

Determines the instruction set architecture of the machines in the pool. Currently, heterogeneous clusters are not supported, so all pools must specify the same architecture. Valid values are amd64 (the default).

String

controlPlane.hyperthreading

Whether to enable or disable simultaneous multithreading, or hyperthreading, on control plane machines. By default, simultaneous multithreading is enabled to increase the performance of your machines’ cores.

If you disable simultaneous multithreading, ensure that your capacity planning accounts for the dramatically decreased machine performance.

Enabled or Disabled

controlPlane.name

Required if you use controlPlane. The name of the machine pool.

master

controlPlane.platform

Required if you use controlPlane. Use this parameter to specify the cloud provider that hosts the control plane machines. This parameter value must match the compute.platform parameter value.

aws, azure, gcp, openstack, ovirt, vsphere, or {}

controlPlane.replicas

The number of control plane machines to provision.

The only supported value is 3, which is the default value.

credentialsMode

The Cloud Credential Operator (CCO) mode. If no mode is specified, the CCO dynamically tries to determine the capabilities of the provided credentials, with a preference for mint mode on the platforms where multiple modes are supported.

Not all CCO modes are supported for all cloud providers. For more information on CCO modes, see the Cloud Credential Operator entry in the Red Hat Operators reference content.

Mint, Passthrough, Manual, or an empty string (“”).

imageContentSources

Sources and repositories for the release-image content.

Array of objects. Includes a source and, optionally, mirrors, as described in the following rows of this table.

imageContentSources.source

Required if you use imageContentSources. Specify the repository that users refer to, for example, in image pull specifications.

String

imageContentSources.mirrors

Specify one or more repositories that may also contain the same images.

Array of strings

publish

How to publish or expose the user-facing endpoints of your cluster, such as the Kubernetes API, OpenShift routes.

Internal or External. The default value is External.

Setting this field to Internal is not supported on non-cloud platforms.

If the value of the field is set to Internal, the cluster will become non-functional. For more information, refer to BZ#1953035.

sshKey

The SSH key or keys to authenticate access your cluster machines.

For production OKD clusters on which you want to perform installation debugging or disaster recovery, specify an SSH key that your ssh-agent process uses.

One or more keys. For example:

  1. sshKey:
  2. <key1>
  3. <key2>
  4. <key3>

Additional oVirt configuration parameters

Additional oVirt configuration parameters are described in the following table:

Table 4. Additional oVirt parameters for clusters
ParameterDescriptionValues

platform.ovirt.ovirt_cluster_id

Required. The Cluster where the VMs will be created.

String. For example: 68833f9f-e89c-4891-b768-e2ba0815b76b

platform.ovirt.ovirt_storage_domain_id

Required. The Storage Domain ID where the VM disks will be created.

String. For example: ed7b0f4e-0e96-492a-8fff-279213ee1468

platform.ovirt.ovirt_network_name

Required. The network name where the VM nics will be created.

String. For example: ocpcluster

platform.ovirt.vnicProfileID

Required. The vNIC profile ID of the VM network interfaces. This can be inferred if the cluster network has a single profile.

String. For example: 3fa86930-0be5-4052-b667-b79f0a729692

platform.ovirt.api_vip

Required. An IP address on the machine network that will be assigned to the API virtual IP (VIP). You can access the OpenShift API at this endpoint.

String. Example: 10.46.8.230

platform.ovirt.ingress_vip

Required. An IP address on the machine network that will be assigned to the Ingress virtual IP (VIP).

String. Example: 10.46.8.232

Additional oVirt parameters for machine pools

Additional oVirt configuration parameters for machine pools are described in the following table:

Table 5. Additional oVirt parameters for machine pools
ParameterDescriptionValues

<machine-pool>.platform.ovirt.cpu

Optional. Defines the CPU of the VM.

Object

<machine-pool>.platform.ovirt.cpu.cores

Required if you use <machine-pool>.platform.ovirt.cpu. The number of cores. Total virtual CPUs (vCPUs) is cores sockets.

Integer

<machine-pool>.platform.ovirt.cpu.sockets

Required if you use <machine-pool>.platform.ovirt.cpu. The number of sockets per core. Total virtual CPUs (vCPUs) is cores sockets.

Integer

<machine-pool>.platform.ovirt.memoryMB

Optional. Memory of the VM in MiB.

Integer

<machine-pool>.platform.ovirt.instanceTypeID

Optional. An instance type UUID, such as 00000009-0009-0009-0009-0000000000f1, which you can get from the https://<engine-fqdn>/ovirt-engine/api/instancetypes endpoint.

String of UUID

<machine-pool>.platform.ovirt.osDisk

Optional. Defines the first and bootable disk of the VM.

String

<machine-pool>.platform.ovirt.osDisk.sizeGB

Required if you use <machine-pool>.platform.ovirt.osDisk. Size of the disk in GiB.

Number

<machine-pool>.platform.ovirt.vmType

Optional. The VM workload type, such as high-performance, server, or desktop. By default, master nodes use high-performance, and worker nodes use server. For details, see Explanation of Settings in the New Virtual Machine and Edit Virtual Machine Windows and Configuring High Performance Virtual Machines, Templates, and Pools in the Virtual Machine Management Guide.

high_performance improves performance on the VM, but there are limitations. For example, you cannot access the VM with a graphical console. For more information see Configuring High Performance Virtual Machines, Templates, and Pools in the Virtual Machine Management Guide.

String

You can replace <machine-pool> with controlPlane or compute.

Deploying the cluster

You can install OKD on a compatible cloud platform.

You can run the create cluster command of the installation program only once, during initial installation.

Prerequisites

  • Open the ovirt-imageio port to the Engine from the machine running the installer. By default, the port is 54322.

  • Obtain the OKD installation program and the pull secret for your cluster.

Procedure

  1. Change to the directory that contains the installation program and initialize the cluster deployment:

    1. $ ./openshift-install create cluster --dir=<installation_directory> \ (1)
    2. --log-level=info (2)
    1For <installation_directory>, specify the location of your customized ./install-config.yaml file.
    2To view different installation details, specify warn, debug, or error instead of info.

    If the cloud provider account that you configured on your host does not have sufficient permissions to deploy the cluster, the installation process stops, and the missing permissions are displayed.

    When the cluster deployment completes, directions for accessing your cluster, including a link to its web console and credentials for the kubeadmin user, display in your terminal.

    Example output

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

    The cluster access and credential information also outputs to <installation_directory>/.openshift_install.log when an installation succeeds.

    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.

    You must not delete the installation program or the files that the installation program creates. Both are required to delete the cluster.

You have completed the steps required to install the cluster. The remaining steps show you how to verify the cluster and troubleshoot the installation.

Installing the OpenShift CLI by downloading the binary

You can install the OpenShift CLI (oc) to interact with OKD from a command-line interface. You can install oc on Linux, Windows, or macOS.

If you installed an earlier version of oc, you cannot use it to complete all of the commands in OKD 4.7. Download and install the new version of oc.

Installing the OpenShift CLI on Linux

You can install the OpenShift CLI (oc) binary on Linux by using the following procedure.

Procedure

  1. Navigate to https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/ and choose the folder for your operating system and architecture.

  2. Download oc.tar.gz.

  3. Unpack the archive:

    1. $ tar xvzf <file>
  4. Place the oc binary in a directory that is on your PATH.

    To check your PATH, execute the following command:

    1. $ echo $PATH

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

  1. $ oc <command>

Installing the OpenShift CLI on Windows

You can install the OpenShift CLI (oc) binary on Windows by using the following procedure.

Procedure

  1. Navigate to https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/ and choose the folder for your operating system and architecture.

  2. Download oc.zip.

  3. Unzip the archive with a ZIP program.

  4. Move the oc binary to a directory that is on your PATH.

    To check your PATH, open the command prompt and execute the following command:

    1. C:\> path

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

  1. C:\> oc <command>

Installing the OpenShift CLI on macOS

You can install the OpenShift CLI (oc) binary on macOS by using the following procedure.

Procedure

  1. Navigate to https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/ and choose the folder for your operating system and architecture.

  2. Download oc.tar.gz.

  3. Unpack and unzip the archive.

  4. Move the oc binary to a directory on your PATH.

    To check your PATH, open a terminal and execute the following command:

    1. $ echo $PATH

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

  1. $ oc <command>

Logging in to the cluster by using the CLI

You can log in to your cluster as a default system user by exporting the cluster kubeconfig file. The kubeconfig file contains information about the cluster that is used by the CLI to connect a client to the correct cluster and API server. The file is specific to a cluster and is created during OKD installation.

Prerequisites

  • You deployed an OKD cluster.

  • You installed the oc CLI.

Procedure

  1. Export the kubeadmin credentials:

    1. $ export KUBECONFIG=<installation_directory>/auth/kubeconfig (1)
    1For <installation_directory>, specify the path to the directory that you stored the installation files in.
  2. Verify you can run oc commands successfully using the exported configuration:

    1. $ oc whoami

    Example output

    1. system:admin

To learn more, see Getting started with the OpenShift CLI.

Verifying cluster status

You can verify your OKD cluster’s status during or after installation.

Procedure

  1. In the cluster environment, export the administrator’s kubeconfig file:

    1. $ export KUBECONFIG=<installation_directory>/auth/kubeconfig (1)
    1For <installation_directory>, specify the path to the directory that you stored the installation files in.

    The kubeconfig file contains information about the cluster that is used by the CLI to connect a client to the correct cluster and API server.

  2. View the control plane and compute machines created after a deployment:

    1. $ oc get nodes
  3. View your cluster’s version:

    1. $ oc get clusterversion
  4. View your Operators’ status:

    1. $ oc get clusteroperator
  5. View all running pods in the cluster:

    1. $ oc get pods -A

Troubleshooting

If the installation fails, the installation program times out and displays an error message. To learn more, see Troubleshooting installation issues.

Accessing the OKD web console on oVirt

After the OKD cluster initializes, you can log into the OKD web console.

Procedure

  1. Optional: In the oVirt Administration Portal, open ComputeCluster.

  2. Verify that the installation program creates the virtual machines.

  3. Return to the command line where the installation program is running. When the installation program finishes, it displays the user name and temporary password for logging into the OKD web console.

  4. In a browser, open the URL of the OKD web console. The URL uses this format:

    1. console-openshift-console.apps.<clustername>.<basedomain> (1)
    1For <clustername>.<basedomain>, specify the cluster name and base domain.

    For example:

    1. console-openshift-console.apps.my-cluster.virtlab.example.com

Additional resources

Troubleshooting common issues with installing on oVirt

Here are some common issues you might encounter, along with proposed causes and solutions.

CPU load increases and nodes go into a Not Ready state

  • Symptom: CPU load increases significantly and nodes start going into a Not Ready state.

  • Cause: The storage domain latency might be too high, especially for control plane nodes (also known as the master nodes).

  • Solution:

    Make the nodes ready again by restarting the kubelet service:

    1. $ systemctl restart kubelet

    Inspect the OKD metrics service, which automatically gathers and reports on some valuable data such as the etcd disk sync duration. If the cluster is operational, use this data to help determine whether storage latency or throughput is the root issue. If so, consider using a storage resource that has lower latency and higher throughput.

    To get raw metrics, enter the following command as kubeadmin or user with cluster-admin privileges:

    1. $ oc get --insecure-skip-tls-verify --server=https://localhost:<port> --raw=/metrics

    To learn more, see Exploring Application Endpoints for the purposes of Debugging with OpenShift 4.x

Trouble connecting the OKD cluster API

  • Symptom: The installation program completes but the OKD cluster API is not available. The bootstrap virtual machine remains up after the bootstrap process is complete. When you enter the following command, the response will time out.

    1. $ oc login -u kubeadmin -p *** <apiurl>
  • Cause: The bootstrap VM was not deleted by the installation program and has not released the cluster’s API IP address.

  • Solution: Use the wait-for subcommand to be notified when the bootstrap process is complete:

    1. $ ./openshift-install wait-for bootstrap-complete

    When the bootstrap process is complete, delete the bootstrap virtual machine:

    1. $ ./openshift-install destroy bootstrap

Post-installation tasks

After the OKD cluster initializes, you can perform the following tasks.

  • Optional: After deployment, add or replace SSH keys using the Machine Config Operator (MCO) in OKD.

  • Optional: Remove the kubeadmin user. Instead, use the authentication provider to create a user with cluster-admin privileges.

Next steps