You can customize and install an OKD cluster on oVirt, similar to the one shown in the following diagram.
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:
Create an installation configuration file, the install-config.yaml
file, by running the installation program and answering its prompts.
Inspect and modify parameters in the install-config.yaml
file.
Make a working copy of the install-config.yaml
file.
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. |
You reviewed details about the OKD installation and update processes.
You have a supported combination of versions in the Support Matrix for OKD on oVirt.
You read the documentation on selecting a cluster installation method and preparing it for users.
If you use a firewall, you configured it to allow the sites that your cluster requires access to.
To install and run an OKD version 4.11 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.
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.
For affinity group support:
One physical machine per worker or control plane. Workers and control planes can be on the same physical machine. For example, if you have three workers and three control planes, you need three physical machines. If you have four workers and three control planes, you need four physical machines.
For hard anti-affinity (default): A minimum of three physical machines. For more than three worker nodes, one physical machine per worker or control plane. Workers and control planes can be on the same physical machine.
For custom affinity groups: Ensure that the resources are appropriate for the affinity group rules that you define.
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 |
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. |
Check that the oVirt version supports installation of OKD version 4.11.
In the oVirt Administration Portal, click the ? help icon in the upper-right corner and select About.
In the window that opens, make a note of the oVirt Software Version.
Confirm that the oVirt version is 4.4. For more information about supported version combinations, see Support Matrix for OKD on oVirt.
Inspect the data center, cluster, and storage.
In the oVirt Administration Portal, click Compute → Data Centers.
Confirm that the data center where you plan to install OKD is accessible.
Click the name of that data center.
In the data center details, on the Storage tab, confirm the storage domain where you plan to install OKD is Active.
Record the Domain Name for use later on.
Confirm Free Space has at least 230 GiB.
Confirm that the storage domain meets these etcd backend performance requirements, which you can measure by using the fio performance benchmarking tool.
In the data center details, click the Clusters tab.
Find the oVirt cluster where you plan to install OKD. Record the cluster name for use later on.
Inspect the oVirt host resources.
In the oVirt Administration Portal, click Compute > Clusters.
Click the cluster where you plan to install OKD.
In the cluster details, click the Hosts tab.
Inspect the hosts and confirm they have a combined total of at least 28 Logical CPU Cores available exclusively for the OKD cluster.
Record the number of available Logical CPU Cores for use later on.
Confirm that these CPU cores are distributed so that each of the seven virtual machines created during installation can have four cores.
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
Record the amount of Max free Memory for scheduling new virtual machines for use later on.
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:
$ curl -k -u <username>@<profile>:<password> \ (1)
https://<engine-fqdn>/ovirt-engine/api (2)
1 | For <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. |
2 | For <engine-fqdn> , specify the fully qualified domain name of the oVirt environment. |
For example:
$ curl -k -u admin@internal:pw123 \
https://ovirtlab.example.com/ovirt-engine/api
Configure two static IP addresses for the OKD cluster and create DNS entries using these addresses.
Reserve two static IP addresses
On the network where you plan to install OKD, identify two static IP addresses that are outside the DHCP lease pool.
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:
$ arp 10.35.1.19
10.35.1.19 (10.35.1.19) -- no entry
Reserve two static IP addresses following the standard practices for your network environment.
Record these IP addresses for future reference.
Create DNS entries for the OKD REST API and apps domain names using this format:
api.<cluster-name>.<base-domain> <ip-address> (1)
*.apps.<cluster-name>.<base-domain> <ip-address> (2)
1 | For <cluster-name> , <base-domain> , and <ip-address> , specify the cluster name, base domain, and static IP address of your OKD API. |
2 | Specify the cluster name, base domain, and static IP address of your OKD apps for Ingress and the load balancer. |
For example:
api.my-cluster.virtlab.example.com 10.35.1.19
*.apps.my-cluster.virtlab.example.com 10.35.1.20
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. |
Create a file named ~/.ovirt/ovirt-config.yaml
.
Add the following content to ovirt-config.yaml
:
ovirt_url: https://ovirt.example.com/ovirt-engine/api (1)
ovirt_fqdn: ovirt.example.com (2)
ovirt_pem_url: ""
ovirt_username: admin@internal
ovirt_password: super-secret-password (3)
ovirt_insecure: true
1 | Specify the hostname or address of your oVirt engine. |
2 | Specify the fully qualified domain name of your oVirt engine. |
3 | Specify the admin password for your oVirt engine. |
Run the installer.
During an OKD installation, you can provide an SSH public key to the installation program. The key is passed to the Fedora CoreOS (FCOS) 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.
After the key is passed to the nodes, you can use the key pair to SSH in to the FCOS 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. |
On clusters running Fedora CoreOS (FCOS), the SSH keys specified in the Ignition config files are written to the |
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:
$ ssh-keygen -t ed25519 -N '' -f <path>/<file_name> (1)
1 | Specify the path and file name, such as ~/.ssh/id_ed25519 , of the new SSH key. If you have an existing key pair, ensure your public key is in the your ~/.ssh directory. |
If you plan to install an OKD cluster that uses FIPS validated or Modules In Process cryptographic libraries on the |
View the public SSH key:
$ cat <path>/<file_name>.pub
For example, run the following to view the ~/.ssh/id_ed25519.pub
public key:
$ 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 gather
command.
On some distributions, default SSH private key identities such as |
If the ssh-agent
process is not already running for your local user, start it as a background task:
$ eval "$(ssh-agent -s)"
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. |
Add your SSH private key to the ssh-agent
:
$ ssh-add <path>/<file_name> (1)
1 | Specify the path and file name for your SSH private key, such as ~/.ssh/id_ed25519 |
Identity added: /home/<you>/<path>/<file_name> (<computer_name>)
When you install OKD, provide the SSH public key to the installation program.
Before you install OKD, download the installation file on a local computer.
You have a computer that runs Linux or macOS, with 500 MB of local disk space.
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. |
Extract the installation program. For example, on a computer that uses a Linux operating system, run the following command:
$ tar -xvf openshift-install-linux.tar.gz
Download your installation pull secret from the 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 OKD components.
Using a pull secret from the Red Hat OpenShift Cluster Manager 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:
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.
You can customize the OKD cluster you install on oVirt.
Obtain the OKD installation program and the pull secret for your cluster.
Obtain service principal permissions at the subscription level.
Create the install-config.yaml
file.
Change to the directory that contains the installation program and run the following command:
$ ./openshift-install create install-config --dir <installation_directory> (1)
1 | For <installation_directory> , specify the directory name to store the
files that the installation program creates. |
When specifying the directory:
Verify that the directory has the execute
permission. This permission is required to run Terraform binaries under the installation directory.
Use an empty directory. Some installation assets, such as bootstrap X.509 certificates, have short expiration intervals, therefore you must not reuse an installation directory. If you want to reuse individual files from another cluster installation, you can copy them into your directory. However, the file names for the installation assets might change between releases. Use caution when copying installation files from an earlier OKD version.
Respond to the installation program prompts.
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 |
For Platform
, select ovirt
.
For Enter oVirt’s API endpoint URL
, enter the URL of the oVirt API using this format:
https://<engine-fqdn>/ovirt-engine/api (1)
1 | For <engine-fqdn> , specify the fully qualified domain name of the oVirt environment. |
For example:
$ curl -k -u admin@internal:pw123 \
https://ovirtlab.example.com/ovirt-engine/api
For Is the oVirt CA trusted locally?
, enter Yes
, because you have already set up a CA certificate. Otherwise, enter No
.
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.
For oVirt engine username
, enter the user name and profile of the oVirt administrator using this format:
<username>@<profile> (1)
1 | For <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: |
admin@internal
For oVirt engine password
, enter the oVirt admin password.
For oVirt cluster
, select the cluster for installing OKD.
For oVirt storage domain
, select the storage domain for installing OKD.
For oVirt network
, select a virtual network that has access to the oVirt Engine REST API.
For Internal API Virtual IP
, enter the static IP address you set aside for the cluster’s REST API.
For Ingress virtual IP
, enter the static IP address you reserved for the wildcard apps domain.
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
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.
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 Red Hat OpenShift Cluster Manager.
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
|
Back up the install-config.yaml
file so that you can use
it to install multiple clusters.
The |
install-config.yaml
files for oVirtYou can customize the OKD cluster the installation program creates by changing the parameters and parameter values in the install-config.yaml
file.
The following examples are specific to installing OKD on oVirt.
install-config.yaml
is located in <installation_directory>
, which you specified when you ran the following command.
$ ./openshift-install create install-config --dir <installation_directory>
|
install-config.yaml
fileapiVersion: v1
baseDomain: example.com
compute:
- architecture: amd64
hyperthreading: Enabled
name: worker
platform:
ovirt:
sparse: false (1)
format: raw (2)
replicas: 3
controlPlane:
architecture: amd64
hyperthreading: Enabled
name: master
platform:
ovirt:
sparse: false (1)
format: raw (2)
replicas: 3
metadata:
creationTimestamp: null
name: my-cluster
networking:
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
machineNetwork:
- cidr: 10.0.0.0/16
networkType: OVNKubernetes
serviceNetwork:
- 172.30.0.0/16
platform:
ovirt:
api_vip: 10.46.8.230
ingress_vip: 192.168.1.5
ovirt_cluster_id: 68833f9f-e89c-4891-b768-e2ba0815b76b
ovirt_storage_domain_id: ed7b0f4e-0e96-492a-8fff-279213ee1468
ovirt_network_name: ovirtmgmt
vnicProfileID: 3fa86930-0be5-4052-b667-b79f0a729692
publish: External
pullsecret: '{"auths": ...}'
sshKey: ssh-ed12345 AAAA...
1 | Setting this option to false enables preallocation of disks. The default is true . Setting sparse to true with format set to raw is not available for block storage domains. The raw format writes the entire virtual disk to the underlying physical disk. |
||
2 | Can be set to cow or raw . The default is cow . The cow format is optimized for virtual machines.
|
install-config.yaml
fileapiVersion: v1
baseDomain: example.com
metadata:
name: test-cluster
platform:
ovirt:
api_vip: 10.46.8.230
ingress_vip: 10.46.8.232
ovirt_cluster_id: 68833f9f-e89c-4891-b768-e2ba0815b76b
ovirt_storage_domain_id: ed7b0f4e-0e96-492a-8fff-279213ee1468
ovirt_network_name: ovirtmgmt
vnicProfileID: 3fa86930-0be5-4052-b667-b79f0a729692
pullsecret: '{"auths": ...}'
sshKey: ssh-ed12345 AAAA...
install-config.yaml
fileapiVersion: v1
baseDomain: example.com
controlPlane:
name: master
platform:
ovirt:
cpu:
cores: 4
sockets: 2
memoryMB: 65536
osDisk:
sizeGB: 100
vmType: server
replicas: 3
compute:
- name: worker
platform:
ovirt:
cpu:
cores: 4
sockets: 4
memoryMB: 65536
osDisk:
sizeGB: 200
vmType: server
replicas: 5
metadata:
name: test-cluster
platform:
ovirt:
api_vip: 10.46.8.230
ingress_vip: 10.46.8.232
ovirt_cluster_id: 68833f9f-e89c-4891-b768-e2ba0815b76b
ovirt_storage_domain_id: ed7b0f4e-0e96-492a-8fff-279213ee1468
ovirt_network_name: ovirtmgmt
vnicProfileID: 3fa86930-0be5-4052-b667-b79f0a729692
pullsecret: '{"auths": ...}'
sshKey: ssh-ed25519 AAAA...
It is recommended to add a non-enforcing affinity group to distribute the control plane and workers, if possible, to use as much of the cluster as possible.
platform:
ovirt:
affinityGroups:
- description: AffinityGroup to place each compute machine on a separate host
enforcing: true
name: compute
priority: 3
- description: AffinityGroup to place each control plane machine on a separate host
enforcing: true
name: controlplane
priority: 5
- description: AffinityGroup to place worker nodes and control plane nodes on separate hosts
enforcing: false
name: openshift
priority: 5
compute:
- architecture: amd64
hyperthreading: Enabled
name: worker
platform:
ovirt:
affinityGroupsNames:
- compute
- openshift
replicas: 3
controlPlane:
architecture: amd64
hyperthreading: Enabled
name: master
platform:
ovirt:
affinityGroupsNames:
- controlplane
- openshift
replicas: 3
For non-production lab setups, you must remove all affinity groups to concentrate the OKD cluster on the few hosts you have.
platform:
ovirt:
affinityGroups: []
compute:
- architecture: amd64
hyperthreading: Enabled
name: worker
platform:
ovirt:
affinityGroupsNames: []
replicas: 3
controlPlane:
architecture: amd64
hyperthreading: Enabled
name: master
platform:
ovirt:
affinityGroupsNames: []
replicas: 3
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 |
Required installation configuration parameters are described in the following table:
Parameter | Description | Values |
---|---|---|
|
The API version for the |
String |
|
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 |
A fully-qualified domain or subdomain name, such as |
|
Kubernetes resource |
Object |
|
The name of the cluster. DNS records for the cluster are all subdomains of |
String of lowercase letters, hyphens ( |
|
The configuration for the specific platform upon which to perform the installation: |
Object |
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.
Globalnet is not supported with Red Hat OpenShift Data Foundation disaster recovery solutions. For regional disaster recovery scenarios, ensure that you use a nonoverlapping range of private IP addresses for the cluster and service networks in each cluster. |
Parameter | Description | Values | ||
---|---|---|---|---|
|
The configuration for the cluster network. |
Object
|
||
|
The cluster network provider Container Network Interface (CNI) cluster network provider to install. |
Either |
||
|
The IP address blocks for pods. The default value is If you specify multiple IP address blocks, the blocks must not overlap. |
An array of objects. For example:
|
||
|
Required if you use An IPv4 network. |
An IP address block in Classless Inter-Domain Routing (CIDR) notation.
The prefix length for an IPv4 block is between |
||
|
The subnet prefix length to assign to each individual node. For example, if |
A subnet prefix. The default value is |
||
|
The IP address block for services. The default value is 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:
|
||
|
The IP address blocks for machines. If you specify multiple IP address blocks, the blocks must not overlap. |
An array of objects. For example:
|
||
|
Required if you use |
An IP network block in CIDR notation. For example,
|
Optional installation configuration parameters are described in the following table:
Parameter | Description | Values | ||
---|---|---|---|---|
|
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 |
||
|
Controls the installation of optional core cluster components. You can reduce the footprint of your OKD cluster by disabling optional components. |
String array |
||
|
Selects an initial set of optional capabilities to enable. Valid values are |
String |
||
|
Extends the set of optional capabilities beyond what you specify in |
String array |
||
|
Enables Linux control groups version 2 (cgroups v2) on specific nodes in your cluster. The OKD process for enabling cgroups v2 disables all cgroup version 1 controllers and hierarchies. The OKD cgroups version 2 feature is in Developer Preview and is not supported by Red Hat at this time. |
|
||
|
The configuration for the machines that comprise the compute nodes. |
Array of |
||
|
Determines the instruction set architecture of the machines in the pool. Currently, clusters with varied architectures are not supported. All pools must specify the same architecture. Valid values are |
String |
||
|
Whether to enable or disable simultaneous multithreading, or
|
|
||
|
Required if you use |
|
||
|
Required if you use |
|
||
|
The number of compute machines, which are also known as worker machines, to provision. |
A positive integer greater than or equal to |
||
|
The configuration for the machines that comprise the control plane. |
Array of |
||
|
Determines the instruction set architecture of the machines in the pool. Currently, clusters with varied architectures are not supported. All pools must specify the same architecture. Valid values are |
String |