Skip to main content

Installing a cluster on Azure into an existing VNet

In OpenShift Container Platform version 4.22, you can install a cluster into an existing Azure Virtual Network (VNet) on Microsoft Azure. The installation program provisions the rest of the required infrastructure, which you can further customize. To customize the installation, you modify parameters in the install-config.yaml file before you install the cluster.

About reusing a VNet for your OpenShift Container Platform cluster​

In OpenShift Container Platform 4.22, you can deploy a cluster into an existing Microsoft Azure Virtual Network (VNet). Deployments in an existing VNet require existing subnets and routing rules.

By deploying OpenShift Container Platform into an existing Azure VNet, you might be able to avoid service limit constraints in new accounts or more easily abide by the operational constraints that your company’s guidelines set. This is a good option to use if you cannot obtain the infrastructure creation permissions that are required to create the VNet.

Requirements for using your VNet​

When you deploy a cluster by using an existing VNet, you must perform additional network configuration before you install the cluster. In installer-provisioned infrastructure clusters, the installation program usually creates the following components, but it does not create them when you install into an existing VNet:

  • Subnets
  • Route tables
  • VNets
  • Network Security Groups
note

The installation program requires that you use the cloud-provided DNS server. Using a custom DNS server is not supported and causes the installation to fail.

If you use a custom VNet, 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 VNet options like DHCP, so you must do so before you install the cluster.

The cluster must be able to access the resource group that contains the existing VNet and subnets. While all of the resources that the cluster creates are placed in a separate resource group that it creates, some network resources are used from a separate group. Some cluster Operators must be able to access resources in both resource groups. For example, the Machine API controller attaches NICs for the virtual machines that it creates to subnets from the networking resource group.

Your VNet must meet the following characteristics:

  • The VNet’s CIDR block must contain the Networking.MachineCIDR range, which is the IP address pool for cluster machines.
  • The VNet and its subnets must belong to the same resource group, and the subnets must be configured to use Azure-assigned DHCP IP addresses instead of static IP addresses.

You must provide two subnets within your VNet, one for the control plane machines and one for the compute machines. Because Azure distributes machines in different availability zones within the region that you specify, your cluster will have high availability by default.

note

By default, if you specify availability zones in the install-config.yaml file, the installation program distributes the control plane machines and the compute machines across availability zones within a region. To ensure high availability for your cluster, select a region with at least three availability zones. If your region contains fewer than three availability zones, the installation program places more than one control plane machine in the available zones. For more information, see "Availability zones" and "Regions".

To ensure that the subnets that you provide are suitable, the installation program confirms the following data:

  • All the specified subnets exist.
  • There are two private subnets, one for the control plane machines and one for the compute machines.
  • The subnet CIDRs belong to the machine CIDR that you specified. Machines are not provisioned in availability zones that you do not provide private subnets for. If required, the installation program creates public load balancers that manage the control plane and worker nodes, and Azure allocates a public IP address to them.
note

If you destroy a cluster that uses an existing VNet, the VNet is not deleted.

Network security group requirements​

The network security groups for the subnets that host the compute and control plane machines require specific access to ensure that the cluster communication is correct. You must create rules to allow access to the required cluster communication ports.

warning

The network security group rules must be in place before you install the cluster. If you attempt to install a cluster without the required access, the installation program cannot reach the Azure APIs, and installation fails.

Required ports

Port Description Control plane Compute
80 Allows HTTP traffic x
443 Allows HTTPS traffic x
6443 Allows communication to the control plane machines x
22623 Allows internal communication to the machine config server for provisioning machines x
  1. If you are using Azure Firewall to restrict the internet access, then you can configure Azure Firewall to allow the Azure APIs. A network security group rule is not needed. For more information, see "Configuring your firewall" in "Additional resources".
warning

Currently, there is no supported way to block or restrict the machine config server endpoint. The machine config server must be exposed to the network so that newly-provisioned machines, which have no existing configuration or state, are able to fetch their configuration. In this model, the root of trust is the certificate signing requests (CSR) endpoint, which is where the kubelet sends its certificate signing request for approval to join the cluster. Because of this, machine configs should not be used to distribute sensitive information, such as secrets and certificates.

To ensure that the machine config server endpoints, ports 22623 and 22624, are secured in bare metal scenarios, customers must configure proper network policies.

Because cluster components do not modify the user-provided network security groups, which the Kubernetes controllers update, a pseudo-network security group is created for the Kubernetes controller to modify without impacting the rest of the environment.

Ports used for all-machine to all-machine communications

Protocol Port Description
ICMP N/A Network reachability tests
TCP 1936 Metrics
9000-9999 Host level services, including the node exporter on ports 9100-9101 and the Cluster Version Operator on port 9099.
10250-10259 The default ports that Kubernetes reserves
UDP 6081 Geneve
9000-9999 Host level services, including the node exporter on ports 9100-9101.
500 IPsec IKE packets
4500 IPsec NAT-T packets
123 Network Time Protocol (NTP) on UDP port 123. If you configure an external NTP time server, you must open UDP port 123.
TCP/UDP 30000-32767 Kubernetes node port
ESP N/A IPsec Encapsulating Security Payload (ESP)

Ports used for control plane machine to control plane machine communications

Protocol Port Description
TCP 2379-2380 etcd server and peer ports

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, like instances, storage, and load balancers, but not networking-related components such as VNets, subnet, or ingress rules.

The Azure credentials that you use when you create your cluster do not need the networking permissions that are required to make VNets and core networking components within the VNet, 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 accounts, and nodes.

Isolation between clusters​

Because the cluster is unable to modify network security groups in an existing subnet, there is no way to isolate clusters from each other on the VNet.

Additional resources

Creating the installation configuration file​

You can customize the OpenShift Container Platform cluster you install on Microsoft Azure.

warning

Do not specify windows, microsoft, or other variants of these words in the metadata.name parameter of the install-config.yaml file. Specifying one of these words for the cluster name causes the installation program to generate an error message like the following example message:

The resource name 'windows-xxxx-identity' or a part of the name is a trademarked or reserved word.

Additionally, specifying login at the beginning of the name in the metadata.name parameter of the install-config.yaml file results in the generation of an error message. You can specify login in the middle or end of the name.

Prerequisites

  • You have the OpenShift Container Platform installation program and the pull secret for your cluster.
  • You have an Azure subscription ID and tenant ID.
  • If you are installing the cluster using a service principal, you have its application ID and password.
  • If you are installing the cluster using a system-assigned managed identity, you have enabled it on the virtual machine that you will run the installation program from.
  • If you are installing the cluster using a user-assigned managed identity, you have met these prerequisites:
    • You have its client ID.
    • You have assigned it to the virtual machine that you will run the installation program from.

Procedure

  1. Optional: If you have run the installation program on this computer before, and want to use an alternative service principal or managed identity, go to the ~/.azure/ directory and delete the osServicePrincipal.json configuration file. Deleting this file prevents the installation program from automatically reusing subscription and authentication values from a previous installation.

  2. Create the install-config.yaml file.

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

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

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

        note

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

      2. Select azure as the platform to target. If the installation program cannot locate the osServicePrincipal.json configuration file from a previous installation, you are prompted for Azure subscription and authentication values.

      3. Enter the following Azure parameter values for your subscription:

        • azure subscription id: Enter the subscription ID to use for the cluster.
        • azure tenant id: Enter the tenant ID.
      4. Depending on the Azure identity you are using to deploy the cluster, do one of the following when prompted for the azure service principal client id:

        • If you are using a service principal, enter its application ID.
        • If you are using a system-assigned managed identity, leave this value blank.
        • If you are using a user-assigned managed identity, specify its client ID.
      5. Depending on the Azure identity you are using to deploy the cluster, do one of the following when prompted for the azure service principal client secret:

        • If you are using a service principal, enter its password.
        • If you are using a system-assigned managed identity, leave this value blank.
        • If you are using a user-assigned managed identity, leave this value blank.
      6. Select the region to deploy the cluster to.

      7. Select the base domain to deploy the cluster to. The base domain corresponds to the Azure DNS Zone that you created for your cluster.

      8. Enter a descriptive name for your cluster.

        warning

        All Azure resources that are available through public endpoints are subject to resource name restrictions, and you cannot create resources that use certain terms. For a list of terms that Azure restricts, see Resolve reserved resource name errors in the Azure documentation.

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

    1. Define the network and subnets for the VNet to install the cluster under the platform.azure field:

      networkResourceGroupName: <vnet_resource_group>
      virtualNetwork: <vnet>
      controlPlaneSubnet: <control_plane_subnet>
      computeSubnet: <compute_subnet>

      where:

      <vnet_resource_group>
      Specifies the resource group name that contains the existing virtual network (VNet).
      <vnet>
      Specifies the existing virtual network name.
      <control_plane_subnet>
      Specifies the existing subnet name to deploy the control plane machines.
      <compute_subnet>
      Specifies the existing subnet name to deploy compute machines.
  4. Back up the install-config.yaml file so that you can use it to install multiple clusters.

    warning

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

    If previously not detected, the installation program creates an osServicePrincipal.json configuration file and stores this file in the ~/.azure/ directory on your computer. This ensures that the installation program can load the profile when it is creating an OpenShift Container Platform cluster on the target platform.

Additional resources

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.
note

In OpenShift Container Platform version 4.22, RHCOS uses RHEL version 9.8, which updates the micro-architecture requirements. Each architecture requires the following minimum instruction set architectures (ISA):

  • x86-64 architecture requires x86-64-v2 ISA
  • ARM64 architecture requires ARMv8.0-A ISA
  • ppc64le architecture requires IBM(R) Power9 ISA
  • s390x architecture requires IBM(R) z14 ISA

For more information, see Architectures in the RHEL documentation.

warning

You must use Azure virtual machines that have the premiumIO parameter set to true.

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

Additional resources

Tested instance types for Azure​

There are several Microsoft Azure instance types tested with OpenShift Container Platform. Choose a listed instance type when you install a cluster on 64-bit x86 infrastructure.

See the following machine types based on 64-bit x86 architecture:

General Purpose​
Azure VM SeriesFamily Name
Basv2-seriesstandardBasv2Family
BS-seriesstandardBSFamily
Bsv2-seriesstandardBsv2Family
Dadsv5-seriesstandardDADSv5Family
Dadsv6-seriesstandardDadv6Family
Daldsv6-seriesstandardDaldv6Family
Dalsv6-seriesstandardDalv6Family
Dasv4-seriesstandardDASv4Family
Dasv5-seriesstandardDASv5Family
Dasv6-seriesstandardDav6Family
DCas_cc_v5-seriesstandardDCACCV5Family
DCads_cc_v5-seriesstandardDCADCCV5Family
DCadsv5-seriesstandardDCADSv5Family
DCasv5-seriesstandardDCASv5Family
DCsv2-seriesstandardDCSv2Family
DCsv3-seriesstandardDCSv3Family
DCdsv3-seriesstandardDDCSv3Family
DCedsv5-seriesstandardDCEDV5Family
DCesv5-seriesstandardDCEV5Family
Ddsv4-seriesstandardDDSv4Family
Ddsv5-seriesstandardDDSv5Family
Ddsv6-seriesStandardDdsv6Family
Dldsv5-seriesstandardDLDSv5Family
Dldsv6-seriesStandardDldsv6Family
Dlsv5-seriesstandardDLSv5Family
Dlsv6-seriesStandardDlsv6Family
DS-seriesstandardDSFamily
Dsv2-seriesstandardDSv2Family
Dsv3-seriesstandardDSv3Family
Dsv4-seriesstandardDSv4Family
Dsv5-seriesstandardDSv5Family
Dsv6-seriesStandardDsv6Family
Memory Optimized​
Azure VM SeriesFamily Name
Eadsv5-seriesstandardEADSv5Family, standardEIADSv5Family
Eadsv6-seriesstandardEadv6Family
Easv4-seriesstandardEASv4Family, standardEIASv4Family
Easv5-seriesstandardEASv5Family, standardEIASv5Family
Easv6-seriesstandardEav6Family
Ebdsv5-seriesstandardEBDSv5Family, standardEIBDSv5Family
Ebsv5-seriesstandardEBSv5Family, standardEIBSv5Family
ECas_cc_v5-seriesstandardECACCV5Family
ECads_cc_v5-seriesstandardECADCCV5Family
ECadsv5-seriesstandardECADSv5Family
ECasv5-seriesstandardECASv5Family
ECedsv5-seriesstandardECEDV5Family
ECesv5-seriesstandardECEV5Family
Edsv4-seriesstandardEDSv4Family
Edsv5-seriesstandardEDSv5Family, standardEIDSv5Family
Edsv6-seriesStandardEdsv6Family
Esv3-seriesstandardESv3Family, standardEISv3Family
Esv4-seriesstandardESv4Family, standardXEISv4Family
Esv5-seriesstandardESv5Family, standardEISv5Family
Esv6-seriesStandardEsv6Family
M-seriesstandardMSFamily
Mbdsv3-seriesStandardMBDSMediumMemoryv3Family
Mbsv3-seriesStandardMBSMediumMemoryv3Family
Mdsv3 High Memory-seriesstandardMDSHighMemoryv3Family, standardMIDSHighMemoryv3Family
Mdsv2 Medium Memory-seriesstandardMDSMediumMemoryv2Family, standardMIDSMediumMemoryv2Family
Mdsv3 Medium Memory-seriesstandardMDSMediumMemoryv3Family
Msv3 High Memory-seriesstandardMISHighMemoryv3Family, standardMSHighMemoryv3Family
Msv2 Medium Memory-seriesstandardMISMediumMemoryv2Family, standardMSMediumMemoryv2Family
Msv3 Medium Memory-seriesstandardMSMediumMemoryv3Family
Compute Optimized​
Azure VM SeriesFamily Name
Falsv6-seriesStandardFalsv6Family
Famsv6-seriesStandardFamsv6Family
Fasv6-seriesStandardFasv6Family
FS-seriesstandardFSFamily
Fsv2-seriesstandardFSv2Family
FXmdsv2-seriesStandardFXmdsv2Family
FX-seriesstandardFXMDVSFamily
FXmsv2-seriesStandardFXmsv2Family
Storage Optimized​
Azure VM SeriesFamily Name
GS-seriesstandardGSFamily
Laosv4-seriesstandardLaosv4Family
Lasv3-seriesstandardLASv3Family
Lasv4-seriesstandardLasv4Family
Ls-seriesstandardLSFamily
Lsv2-seriesstandardLSv2Family
Lsv3-seriesstandardLSv3Family
Lsv4-seriesstandardLsv4Family
GPU Accelerated​
Azure VM SeriesFamily Name
NC_A100_v4-seriesStandardNCADSA100v4Family
NCads_H100_v5-seriesStandardNCadsH100v5Family
NCCads_H100_v5-seriesStandardNCCads2023Family
NCasT4_v3-seriesStandard NCASv3_T4 Family
NCv3-seriesstandardNCSv3Family
NDasrA100_v4-seriesStandard NDASv4_A100 Family
ND-H200-v5-seriesstandardNDISRH200V5Family
ND-H100-v5-seriesstandardNDSH100v5Family
NDv2-seriesstandardNDSv2Family
NGads_V620-seriesStandardNGADSV620v1Family
NVadsA10_v5-seriesStandardNVADSA10v5Family
NVads V710 v5-seriesStandardNVadsV710v5Family
NVv3-seriesstandardNVSv3Family
FPGA Accelerated​
Azure VM SeriesFamily Name
NPS-seriesstandardNPSFamily
High Performance Compute​
Azure VM SeriesFamily Name
HBv2-seriesstandardHBrsv2Family
HBv4-seriesstandardHBv4Family
HBv5-seriesstandardHBv5Family
HC-seriesstandardHCSFamily
HX-seriesstandardHXFamily

Tested instance types for Azure on 64-bit ARM infrastructures​

There are several Microsoft Azure ARM64 instance types tested with OpenShift Container Platform. Choose a listed instance type when you install a cluster on 64-bit ARM infrastructure.

See the following machine types based on 64-bit ARM architecture:

General Purpose (ARM64)​
Azure VM SeriesFamily Name
Bpsv2-seriesstandardBpsv2Family
Dpdsv5-seriesstandardDPDSv5Family
Dpldsv5-seriesstandardDPLDSv5Family
Dplsv5-seriesstandardDPLSv5Family
Dpsv5-seriesstandardDPSv5Family
Dpdsv6-seriesStandardDpdsv6Family
Dpldsv6-seriesStandardDpldsv6Family
Dplsv6-seriesStandardDplsv6Family
Dpsv6-seriesStandardDpsv6Family
Memory Optimized (ARM64)​
Azure VM SeriesFamily Name
Epdsv5-seriesstandardEPDSv5Family
Epsv5-seriesstandardEPSv5Family
Epdsv6-seriesStandardEpdsv6Family
Epsv6-seriesStandardEpsv6Family

Enabling trusted launch for Azure VMs​

To enable trusted launch on Azure virtual machines for your OpenShift Container Platform cluster, you can configure secure boot and virtualized Trusted Platform Modules in the install-config.yaml file. Apply the settings to control plane nodes, compute nodes, or all nodes as needed.

For more information about the sizes of virtual machines that support the trusted launch features, secure boot, and virtualized Trusted Platform Modules, see the Additional resources section.

warning

Trusted launch is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.

Prerequisites

  • You have created an install-config.yaml file.

Procedure

  • Edit the install-config.yaml file before deploying your cluster:
    • Enable trusted launch only on control plane by adding the following stanza:
      controlPlane:
      platform:
      azure:
      settings:
      securityType: TrustedLaunch
      trustedLaunch:
      uefiSettings:
      secureBoot: Enabled
      virtualizedTrustedPlatformModule: Enabled
    • Enable trusted launch only on compute node by adding the following stanza:
      compute:
      platform:
      azure:
      settings:
      securityType: TrustedLaunch
      trustedLaunch:
      uefiSettings:
      secureBoot: Enabled
      virtualizedTrustedPlatformModule: Enabled
    • Enable trusted launch on all nodes by adding the following stanza:
      platform:
      azure:
      settings:
      securityType: TrustedLaunch
      trustedLaunch:
      uefiSettings:
      secureBoot: Enabled
      virtualizedTrustedPlatformModule: Enabled

Enable confidential VMs​

To enable confidential VMs on Azure for your OpenShift Container Platform cluster, you can configure the install-config.yaml file before deployment. Apply the settings to control plane nodes, compute nodes, or all nodes as needed.

You can use confidential VMs with the following VM sizes:

  • DCasv5-series
  • DCadsv5-series
  • ECasv5-series
  • ECadsv5-series
  • DCesv5-series
  • DCedsv5-series
  • ECesv5-series
  • ECedsv5-series
  • NCCads_H100_v5
warning

Confidential VMs are currently not supported on 64-bit ARM architectures.

Prerequisites

  • You have created an install-config.yaml file.

Procedure

  • Edit the install-config.yaml file before deploying your cluster:
    • Enable confidential VMs only on control plane by adding the following stanza:
      controlPlane:
      platform:
      azure:
      settings:
      securityType: ConfidentialVM
      confidentialVM:
      uefiSettings:
      secureBoot: Enabled
      virtualizedTrustedPlatformModule: Enabled
      osDisk:
      securityProfile:
      securityEncryptionType: VMGuestStateOnly
    • Enable confidential VMs only on compute nodes by adding the following stanza:
      compute:
      platform:
      azure:
      settings:
      securityType: ConfidentialVM
      confidentialVM:
      uefiSettings:
      secureBoot: Enabled
      virtualizedTrustedPlatformModule: Enabled
      osDisk:
      securityProfile:
      securityEncryptionType: VMGuestStateOnly
    • Enable confidential VMs on all nodes by adding the following stanza:
      platform:
      azure:
      defaultMachinePlatform:
      settings:
      securityType: ConfidentialVM
      confidentialVM:
      uefiSettings:
      secureBoot: Enabled
      virtualizedTrustedPlatformModule: Enabled
      osDisk:
      securityProfile:
      securityEncryptionType: VMGuestStateOnly

Enabling a user-managed DNS​

To manage API and Ingress DNS records in your own system, install your cluster with a DNS solution that you manage.

This solution replaces the default cluster-provisioned DNS solution. For example, your organization’s security policies might not allow the use of public DNS services such as Microsoft Azure. 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.

Prerequisites

  • You installed the jq package.

Procedure

  • Before you deploy your cluster, use a text editor to open the install-config.yaml file and add the following stanza:
    • To enable user-managed DNS:

      # ...

      platform:
      azure:
      userProvisionedDNS: Enabled

      where:

      userProvisionedDNS
      Enables user-provisioned DNS management.

Next steps

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

Sample customized install-config.yaml file for Azure​

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

warning

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. For a full list and description of all installation configuration parameters, see Installation configuration parameters for Azure.

Sample install-config.yaml file for Azure
apiVersion: v1
baseDomain: example.com
pullSecret: '{"auths": ...}'
sshKey: ssh-ed25519 AAAA...
metadata:
name: example-cluster
controlPlane:
hyperthreading: Enabled
name: master
platform:
azure:
type: Standard_D8s_v3
replicas: 3
compute:
- hyperthreading: Enabled
name: worker
platform:
azure:
type: Standard_D2s_v3
replicas: 3
networking:
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
platform:
azure:
baseDomainResourceGroupName: example-basedomain-resourcegroup-name
region: centralus

where:

controlPlane
Specifies parameters that apply to control plane machines.
compute
Specifies parameters that apply to compute machines.
networking
Specifies parameters that apply to the cluster networking configuration. If you do not provide networking values, the installation program provides default values.
platform
Specifies parameters that apply to the infrastructure platform that hosts the cluster.

Additional resources

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.yaml file.

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

    note

    The Proxy object status.noProxy field includes the values of the networking.machineNetwork[].cidr, networking.clusterNetwork[].cidr, and networking.serviceNetwork[] fields from your installation configuration.

    For installations on Amazon Web Services (AWS), Google Cloud, Microsoft Azure, and Red Hat OpenStack Platform (RHOSP), the Proxy object status.noProxy field also includes the instance metadata endpoint (169.254.169.254).

Procedure

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

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

    where:

    proxy.httpProxy
    Specifies a proxy URL to use for creating HTTP connections outside the cluster. The URL scheme must be http.
    proxy.httpsProxy
    Specifies a proxy URL to use for creating HTTPS connections outside the cluster.
    proxy.noProxy
    Specifies a comma-separated list of destination domain names, IP addresses, or other network CIDRs to exclude from proxying. Preface a domain with . to match subdomains only. For example, .y.com matches x.y.com, but not y.com. Use * to bypass the proxy for all destinations.
    additionalTrustBundle
    If you specify this value, the installation program generates a config map named user-ca-bundle in the openshift-config namespace to hold the additional CA certificates. If you specify additionalTrustBundle and at least one proxy setting, the Proxy object references the user-ca-bundle config map in the trustedCA field. The Cluster Network Operator then creates a trusted-ca-bundle config map that merges the contents specified for the trustedCA parameter with the RHCOS trust bundle. You must set the additionalTrustBundle field unless an authority from the RHCOS trust bundle signs the proxy’s identity certificate.
    additionalTrustBundlePolicy
    Specifies the policy that determines the configuration of the Proxy object to reference the user-ca-bundle config map in the trustedCA field. The allowed values are Proxyonly and Always. Use Proxyonly to reference the user-ca-bundle config map only when you configure an http/https proxy. Use Always to always reference the user-ca-bundle config map. The default value is Proxyonly. Optional parameter.
    note

    The installation program does not support the proxy readinessEndpoints field.

    note

    If the installation program times out, restart and then complete the deployment by using the wait-for command of the installation program. For example:

    $ ./openshift-install wait-for install-complete --log-level debug
  2. Save the file and reference it when installing OpenShift Container Platform. The installation program creates a cluster-wide proxy named cluster that uses the proxy settings in the install-config.yaml file. If you do not give proxy settings, the installation program still creates a cluster Proxy object, but it has a nil spec.

    note

    Only the Proxy object named cluster is supported, and you cannot create additional proxies.

Additional resources

Alternatives to storing administrator-level secrets in the kube-system project​

To avoid storing administrator-level secrets in the kube-system project, you can configure your cluster to use manually managed long-term cloud credentials or short-term credentials that are managed outside the cluster.

By default, administrator-level secrets are stored in the kube-system project. If you set the credentialsMode parameter in the install-config.yaml file to Manual, choose one of the following credential management options:

  • To manage long-term cloud credentials manually, follow the procedure in "Manually creating long-term credentials".
  • To use short-term credentials that are managed outside the cluster for individual components, follow the procedures in "Configuring an Azure cluster to use short-term credentials".

Additional resources

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

  1. If you did not set the credentialsMode parameter in the install-config.yaml configuration file to Manual, modify the value as shown:

    Sample configuration file snippet
    apiVersion: v1
    baseDomain: example.com
    credentialsMode: Manual
    # ...
  2. If you have not previously created installation manifest files, do so by running the following command:

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

    where <installation_directory> is the directory in which the installation program creates files.

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

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

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

    where:

    --included
    Specifies only the manifests that your specific cluster configuration requires.
    <path_to_directory_with_installation_configuration>
    Specifies the location of the install-config.yaml file.
    <path_to_directory_for_credentials_requests>
    Specifies the path to the directory where you want to store the CredentialsRequest objects. If the specified directory does not exist, this command creates it. This command creates a YAML file for each CredentialsRequest object.
    Sample CredentialsRequest object
    apiVersion: cloudcredential.openshift.io/v1
    kind: CredentialsRequest
    metadata:
    name: <component_credentials_request>
    namespace: openshift-cloud-credential-operator
    ...
    spec:
    providerSpec:
    apiVersion: cloudcredential.openshift.io/v1
    kind: AzureProviderSpec
    roleBindings:
    - role: Contributor
    ...
  5. Create YAML files for secrets in the openshift-install manifests directory that you generated previously. The secrets must be stored using the namespace and secret name defined in the spec.secretRef for each CredentialsRequest object.

    Sample CredentialsRequest object with secrets
    apiVersion: cloudcredential.openshift.io/v1
    kind: CredentialsRequest
    metadata:
    name: <component_credentials_request>
    namespace: openshift-cloud-credential-operator
    ...
    spec:
    providerSpec:
    apiVersion: cloudcredential.openshift.io/v1
    kind: AzureProviderSpec
    roleBindings:
    - role: Contributor
    ...
    secretRef:
    name: <component_secret>
    namespace: <component_namespace>
    ...
    Sample Secret object
    apiVersion: v1
    kind: Secret
    metadata:
    name: <component_secret>
    namespace: <component_namespace>
    data:
    azure_subscription_id: <base64_encoded_azure_subscription_id>
    azure_client_id: <base64_encoded_azure_client_id>
    azure_client_secret: <base64_encoded_azure_client_secret>
    azure_tenant_id: <base64_encoded_azure_tenant_id>
    azure_resource_prefix: <base64_encoded_azure_resource_prefix>
    azure_resourcegroup: <base64_encoded_azure_resourcegroup>
    azure_region: <base64_encoded_azure_region>
    warning

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

Configuring an Azure cluster to use short-term credentials​

To install a cluster that uses Microsoft Entra Workload ID, you must configure the Cloud Credential Operator utility and create the required Azure resources for your cluster.

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.

note

The ccoctl utility is a Linux binary that must run in a Linux environment.

Prerequisites

  • You have access to an OpenShift Container Platform account with cluster administrator access.
  • You have installed the OpenShift CLI (oc).
  • You have created a global Azure account for the ccoctl utility to use with the following permissions:
    • Microsoft.Resources/subscriptions/resourceGroups/read
    • Microsoft.Resources/subscriptions/resourceGroups/write
    • Microsoft.Resources/subscriptions/resourceGroups/delete
    • Microsoft.Authorization/roleAssignments/read
    • Microsoft.Authorization/roleAssignments/delete
    • Microsoft.Authorization/roleAssignments/write
    • Microsoft.Authorization/roleDefinitions/read
    • Microsoft.Authorization/roleDefinitions/write
    • Microsoft.Authorization/roleDefinitions/delete
    • Microsoft.Storage/storageAccounts/listkeys/action
    • Microsoft.Storage/storageAccounts/delete
    • Microsoft.Storage/storageAccounts/read
    • Microsoft.Storage/storageAccounts/write
    • Microsoft.Storage/storageAccounts/blobServices/containers/delete
    • Microsoft.Storage/storageAccounts/blobServices/containers/read
    • Microsoft.Storage/storageAccounts/blobServices/containers/write
    • Microsoft.ManagedIdentity/userAssignedIdentities/delete
    • Microsoft.ManagedIdentity/userAssignedIdentities/read
    • Microsoft.ManagedIdentity/userAssignedIdentities/write
    • Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials/read
    • Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials/write
    • Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials/delete
    • Microsoft.Storage/register/action
    • Microsoft.ManagedIdentity/register/action

Procedure

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

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

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

    Ensure that the architecture of the $RELEASE_IMAGE matches the architecture of the environment in which you will use the ccoctl tool.

  3. Extract the ccoctl binary from the CCO container image within the OpenShift Container Platform release image by running the following command:

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

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

    • rhel8: Specify this value for hosts that use RHEL 8.

    • rhel9: Specify this value for hosts that use RHEL 9.

      note

      The ccoctl binary is created in the directory from where you executed the command and not in /usr/bin/. You must rename the directory or move the ccoctl.<rhel_version> binary to ccoctl.

  4. Change the permissions to make ccoctl executable by running the following command:

    $ chmod 775 ccoctl

Verification

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

    $ ./ccoctl
    Example output
    OpenShift credentials provisioning tool

    Usage:
    ccoctl [command]

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

    Flags:
    -h, --help help for ccoctl

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

= Creating Azure resources with the Cloud Credential Operator utility

You can use the ccoctl azure create-all command to automate the creation of Azure resources.

note

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

Prerequisites

You must have:

  • Extracted and prepared the ccoctl binary.
  • Access to your Microsoft Azure account by using the Azure CLI.

Procedure

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

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

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

    where:

    --included
    Specifies to include only the manifests that your specific cluster configuration requires.
    <path_to_directory_with_installation_configuration>
    Specifies the location of the install-config.yaml file.
    <path_to_directory_for_credentials_requests>
    Specifies the path to the directory where you want to store the CredentialsRequest objects. If the specified directory does not exist, this command creates it.
    note

    This command might take a few moments to run.

  3. To enable the ccoctl utility to detect your Azure credentials automatically, log in to the Azure CLI by running the following command:

    $ az login
  4. Use the ccoctl tool to process all CredentialsRequest objects by running the following command:

    $ ccoctl azure create-all \
    --name=<azure_infra_name> \
    --output-dir=<ccoctl_output_dir> \
    --region=<azure_region> \
    --subscription-id=<azure_subscription_id> \
    --credentials-requests-dir=<path_to_credentials_requests_directory> \
    --dnszone-resource-group-name=<azure_dns_zone_resource_group_name> \
    --tenant-id=<azure_tenant_id> \
    --network-resource-group-name <azure_resource_group> \
    --preserve-existing-roles

    where:

    <azure_infra_name>
    Specifies the user-defined name for all created Azure resources used for tracking.
    <ccoctl_output_dir>
    Specifies the directory in which you want the ccoctl utility to create objects. By default, the utility creates objects in the directory in which the commands are run. This parameter is optional.
    <azure_region>
    Specifies the Azure region in which cloud resources will be created.
    <azure_subscription_id>
    Specifies the Azure subscription ID to use.
    <path_to_credentials_requests_directory>
    Specifies the directory containing the files for the component CredentialsRequest objects.
    <azure_dns_zone_resource_group_name>
    Specifies the name of the resource group containing the cluster’s base domain Azure DNS zone.
    <azure_tenant_id>
    Specifies the Azure tenant ID to use.
    <azure_resource_group>
    Specifies the virtual network resource group if it is different from the cluster resource group. This parameter is optional.
    --preserve-existing-roles
    Specifies that any custom role assignments you define on managed identities are not removed during OpenShift Container Platform updates. This parameter is optional.
    note

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

    To see additional optional parameters and explanations of how to use them, run the azure create-all --help command.

Verification

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

    $ ls <path_to_ccoctl_output_dir>/manifests
    Example output
    azure-ad-pod-identity-webhook-config.yaml
    cluster-authentication-02-config.yaml
    openshift-cloud-controller-manager-azure-cloud-credentials-credentials.yaml
    openshift-cloud-network-config-controller-cloud-credentials-credentials.yaml
    openshift-cluster-api-capz-manager-bootstrap-credentials-credentials.yaml
    openshift-cluster-csi-drivers-azure-disk-credentials-credentials.yaml
    openshift-cluster-csi-drivers-azure-file-credentials-credentials.yaml
    openshift-image-registry-installer-cloud-credentials-credentials.yaml
    openshift-ingress-operator-cloud-credentials-credentials.yaml
    openshift-machine-api-azure-cloud-credentials-credentials.yaml

    You can verify that the Microsoft Entra ID service accounts are created by querying Azure. For more information, refer to Azure documentation on listing Entra ID service accounts.

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 ccoctl utility.

Procedure

  1. If you did not set the credentialsMode parameter in the install-config.yaml configuration file to Manual, modify the value as shown:

    Sample configuration file snippet
    apiVersion: v1
    baseDomain: example.com
    credentialsMode: Manual
    # ...
  2. If you used the ccoctl utility to create a new Azure resource group instead of using an existing resource group, modify the resourceGroupName parameter in the install-config.yaml as shown:

    Sample configuration file snippet
    apiVersion: v1
    baseDomain: example.com
    # ...
    platform:
    azure:
    resourceGroupName: <azure_infra_name>
    # ...

    The <azure_infra_name> value must match the user-defined name for Azure resources that was specified with the --name argument of the ccoctl azure create-all command.

  3. If you have not previously created installation manifest files, do so by running the following command:

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

    where <installation_directory> is the directory in which the installation program creates files.

  4. Copy the manifests that the ccoctl utility generated to the manifests directory that the installation program created by running the following command:

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

    $ 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.

warning

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 an Azure subscription ID and tenant ID.

Procedure

  • 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=info

where:

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

Verification

When the cluster deployment completes successfully:

  • The terminal displays directions for accessing your cluster, including a link to the web console and credentials for the kubeadmin user.

  • Credential information also outputs to <installation_directory>/.openshift_install.log.

    warning

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

    The following example shows the expected output:

    ...
    INFO Install complete!
    INFO To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/home/myuser/install_dir/auth/kubeconfig'
    INFO Access the OpenShift web-console here: https://console-openshift-console.apps.mycluster.example.com
    INFO Login to the console with user: "kubeadmin", and password: "password"
    INFO Time elapsed: 36m22s
    warning
    • The Ignition config files that the installation program generates contain certificates that expire after 24 hours, which are then renewed at that time. If the cluster is shut down before renewing the certificates and the cluster is later restarted after the 24 hours have elapsed, the cluster automatically recovers the expired certificates. The exception is that you must manually approve the pending node-bootstrapper certificate signing requests (CSRs) to recover kubelet certificates. See the documentation for Recovering from expired control plane certificates for more information.
    • It is recommended that you use Ignition config files within 12 hours after they are generated because the 24-hour certificate rotates from 16 to 22 hours after the cluster is installed. By using the Ignition config files within 12 hours, you can avoid installation failure if the certificate update runs during installation.

Provisioning your own DNS records​

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.

Prerequisite

  • You have installed the Azure CLI client (az).

Procedure

  1. Add the userProvisionedDNS parameter to the install-config.yaml file and enable the parameter. For more information, see "Enabling a user-managed DNS".

  2. Install your cluster.

  3. If you are installing a private cluster, set the lb_name variable by running the following command:

    $ lb_name="${infra_id}-internal"
    1. Set the frontendipconfig_id variable by running the following command:
      $ frontendipconfig_id=$(az network lb show -n ${lb_name} -g ${cluster_resource_group_name} -ojson | jq -r ".loadBalancingRules[] | select(.frontendPort == 6443) | .frontendIPConfiguration.id")
    2. Set the frontendipconfig_name variable by running the following command:
      $ frontendipconfig_name=${frontendipconfig_id##*/}
    3. To retrieve the IP address of the API service, run the following command:
      $ az network lb frontend-ip show -n ${frontendipconfig_name} --lb-name ${lb_name} -g ${cluster_resource_group_name} --query "privateIPAddress" -otsv
  4. If you are installing a public cluster, set the lb_name variable by running the following command:

    $ lb_name="${infra_id}"
    1. Set the frontendipconfig_id variable by running the following command:
      $ frontendipconfig_id=$(az network lb show -n ${lb_name} -g ${cluster_resource_group_name} -ojson | jq -r ".loadBalancingRules[] | select(.frontendPort == 6443) | .frontendIPConfiguration.id")
    2. Set the frontendipconfig_name variable by running the following command:
      $ frontendipconfig_name=${frontendipconfig_id##*/}
    3. Set the frontendpublicip_id variable by running the following command:
      $ frontendpublicip_id=$(az network lb frontend-ip show -n ${frontendipconfig_name} --lb-name ${lb_name} -g ${cluster_resource_group_name} --query "publicIPAddress.id" -otsv)
    4. To retrieve the IP address of the API service, run the following command:
      $ az network public-ip show --ids ${frontendpublicip_id} --query 'ipAddress' -otsv
  5. Use the IP address and your cluster name and base cluster domain to configure your own DNS record with the api.<cluster_name>.<base_domain>. hostname.

  6. If you are installing a private cluster, set the lb_name variable by running the following command:

    $ lb_name="${infra_id}-internal"
    1. Set the frontendipconfig_id variable by running the following command:
      $ frontendipconfig_id=$(az network lb show -n ${lb_name} -g ${cluster_resource_group_name} -ojson | jq -r ".loadBalancingRules[] | select(.frontendPort == 443) | .frontendIPConfiguration.id")
    2. Set the frontendipconfig_name variable by running the following command:
      $ frontendipconfig_name=${frontendipconfig_id##*/}
    3. To retrieve the IP address of the Ingress service, run the following command:
      $ az network lb frontend-ip show -n ${frontendipconfig_name} --lb-name ${lb_name} -g ${cluster_resource_group_name} --query "privateIPAddress" -otsv
  7. If you are installing a public cluster, set the lb_name variable by running the following command:

    $ lb_name="${infra_id}"
    1. Set the frontendipconfig_id variable by running the following command:
      $ frontendipconfig_id=$(az network lb show -n ${lb_name} -g ${cluster_resource_group_name} -ojson | jq -r ".loadBalancingRules[] | select(.frontendPort == 443) | .frontendIPConfiguration.id")
    2. Set the frontendipconfig_name variable by running the following command:
      $ frontendipconfig_name=${frontendipconfig_id##*/}
    3. Set the frontendpublicip_id variable by running the following command:
      $ frontendpublicip_id=$(az network lb frontend-ip show -n ${frontendipconfig_name} --lb-name ${lb_name} -g ${cluster_resource_group_name} --query "publicIPAddress.id" -otsv)
    4. To retrieve the IP address of the Ingress service, run the following command:
      $ az network public-ip show --ids ${frontendpublicip_id} --query 'ipAddress' -otsv
  8. Use the IP address and your cluster name and base cluster domain to configure your own DNS record with the *.apps.<cluster_name>.<base_domain>. hostname.

Additional resources