Installing a cluster quickly on Azure

    • You reviewed details about the OKD installation and update processes.

    • You read the documentation on .

    • You configured an Azure account to host the cluster and determined the tested and validated region to deploy the cluster to.

    • If you use a firewall, you that your cluster requires access to.

    • If the cloud identity and access management (IAM) APIs are not accessible in your environment, or if you do not want to store an administrator-level credential secret in the namespace, you can manually create and maintain IAM credentials.

    Generating a key pair for cluster node SSH access

    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.

    You must use a local key, not one that you configured with platform-specific approaches such as AWS key pairs.

    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 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:

      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.

      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. View the public SSH key:

      1. $ cat <path>/<file_name>.pub

      For example, run the following to view the ~/.ssh/id_rsa.pub public key:

      1. $ cat ~/.ssh/id_rsa.pub
    3. 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.

      1. If the ssh-agent process is not already running for your local user, start it 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.

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

      1. $ ssh-add <path>/<file_name> (1)
      1Specify the path and file name for your SSH private key, such as ~/.ssh/id_rsa

      Example output

    Next steps

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

    Prerequisites

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

    Procedure

    1. Download installer from

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

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

      • Red Hat Operators are not available.

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

    Deploying the cluster

    You can install OKD on a compatible cloud platform.

    Prerequisites

    • Configure an account with the cloud platform that hosts your cluster.

    • 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 , specify the directory name to store the files that the installation program creates.
      2To view different installation details, specify warn, debug, or error instead of info.

      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.

      Provide values at the prompts:

      1. Optional: Select an SSH key to use to 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.

      2. Select azure as the platform to target.

      3. If you do not have a Microsoft Azure profile stored on your computer, specify the following Azure parameter values for your subscription and service principal:

        • azure subscription id: The subscription ID to use for the cluster. Specify the id value in your account output.

        • azure tenant id: The tenant ID. Specify the tenantId value in your account output.

        • azure service principal client id: The value of the appId parameter for the service principal.

        • azure service principal client secret: The value of the password parameter for the service principal.

      4. Select the region to deploy the cluster to.

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

      6. Enter a descriptive name for your cluster.

        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 in the Azure documentation.

      7. Paste the pull secret that you obtained from the Pull Secret page on the Red Hat OpenShift Cluster Manager site.

        • If you do not have a pull secret from the Red Hat OpenShift Cluster Manager site, you can paste the pull secret another private registry.

        • If you do not need the cluster to pull images from a private registry, you can paste {"auths":{"fake":{"auth":"aWQ6cGFzcwo="}}} as the pull secret.

    1. <table><tbody><tr><td><i title="Note"></i></td><td><div><p>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.</p></div></td></tr></tbody></table>
    2. 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.
    3. Example output
    4. ```
    5. ...
    6. INFO Install complete!
    7. INFO To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=/home/myuser/install_dir/auth/kubeconfig'
    8. INFO Access the OpenShift web-console here: https://console-openshift-console.apps.mycluster.example.com
    9. INFO Login to the console with user: "kubeadmin", and password: "4vYBz-Ee6gm-ymBZj-Wt5AL"
    10. INFO Time elapsed: 36m22s
    11. <table><tbody><tr><td><i title="Note"></i></td><td><div><p>The cluster access and credential information also outputs to <code>&lt;installation_directory&gt;/.openshift_install.log</code> when an installation succeeds.</p></div></td></tr></tbody></table>
    12. <table><tbody><tr><td><i title="Important"></i></td><td><div><p>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 <code>node-bootstrapper</code> certificate signing requests (CSRs) to recover kubelet certificates. See the documentation for <em>Recovering from expired control plane certificates</em> for more information.</p></div></td></tr></tbody></table>
    13. <table><tbody><tr><td><i title="Important"></i></td><td><div><p>You must not delete the installation program or the files that the installation program creates. Both are required to delete the cluster.</p></div></td></tr></tbody></table>

    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.

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

    Procedure

    1. Download oc.tar.gz.

    2. Unpack the archive:

      1. $ tar xvzf <file>
    3. 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:

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

    Procedure

    1. Navigate to 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>

    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:

      Example output

      1. system:admin

    Additional resources

    Additional resources

    • See for more information about the Telemetry service