Installing a cluster on AWS with worker nodes on AWS Local Zones

You can quickly install an OKD cluster in Amazon Web Services (AWS) Local Zones by setting the zone names in the edge compute pool of the install-config.yaml file, or install a cluster in an existing VPC that lists Local Zone subnets.

AWS Local Zones are a type of infrastructure that place Cloud Resources close to metropolitan regions. For more information, see the AWS Local Zones Documentation.

The steps for performing an installer-provisioned infrastructure installation are provided for example purposes only. Installing a cluster in an existing VPC requires that you have knowledge of the cloud provider and the installation process of OKD. You can use a CloudFormation template to assist you with completing these steps or to help model your own cluster installation. Instead of using the CloudFormation template to create resources, you can decide to use other methods for generating these resources.

Prerequisites

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

  • You read the documentation on selecting a cluster installation method and preparing it for users.

  • You configured an AWS account to host the cluster.

    If you have an AWS profile stored on your computer, it must not use a temporary session token that you generated while using a multi-factor authentication device. The cluster continues to use your current AWS credentials to create AWS resources for the entire life of the cluster, so you must use key-based, long-term credentials. To generate appropriate keys, see Managing Access Keys for IAM Users in the AWS documentation. You can supply the keys when you run the installation program.

  • You noted the region and supported AWS Local Zones locations to create the network resources in.

  • You read the Features for each AWS Local Zones location.

  • You downloaded the AWS CLI and installed it on your computer. See Install the AWS CLI Using the Bundled Installer (Linux, macOS, or UNIX) in the AWS documentation.

  • If you use a firewall, you configured it to allow the sites that your cluster requires access to.

    Be sure to also review this site list if you are configuring a proxy.

  • Add permission for the user who creates the cluster to modify the Local Zone group with ec2:ModifyAvailabilityZoneGroup. For example:

    An example of a permissive IAM policy to attach to a user or role

    1. {
    2. "Version": "2012-10-17",
    3. "Statement": [
    4. {
    5. "Action": [
    6. "ec2:ModifyAvailabilityZoneGroup"
    7. ],
    8. "Effect": "Allow",
    9. "Resource": "*"
    10. }
    11. ]
    12. }

Cluster limitations in AWS Local Zones

Some limitations exist when you attempt to deploy a cluster with a default installation configuration in Amazon Web Services (AWS) Local Zones.

The following list details limitations when deploying a cluster in AWS Local Zones:

  • The Maximum Transmission Unit (MTU) between an Amazon EC2 instance in a Local Zone and an Amazon EC2 instance in the Region is 1300. This causes the cluster-wide network MTU to change according to the network plugin that is used on the deployment.

  • Network resources such as Network Load Balancer (NLB), Classic Load Balancer, and Network Address Translation (NAT) Gateways are not globally supported in AWS Local Zones.

  • For an OKD cluster on AWS, the AWS Elastic Block Storage (EBS) gp3 type volume is the default for node volumes and the default for the storage class. This volume type is not globally available on Local Zone locations. By default, the nodes running in Local Zones are deployed with the gp2 EBS volume. The gp2-csi StorageClass must be set when creating workloads on Local Zone nodes.

If you want the installation program to automatically create Local Zone subnets for your OKD cluster, specific configuration limitations apply with this method.

The following configuration limitation applies when you set the installation program to automatically create subnets for your OKD cluster:

  • The private subnets for an AWS Local Zone associate with the route table of the parent zone, so that each private subnet can route egress traffic to the internet. If this route table does not exist during cluster installation, the private subnet associates with the first available private route table in the Virtual Private Cloud (VPC). This approach is valid only for AWS Local Zones subnets in an OKD cluster.

Additional resources

Obtaining an AWS Marketplace image

If you are deploying an OKD cluster using an AWS Marketplace image, you must first subscribe through AWS. Subscribing to the offer provides you with the AMI ID that the installation program uses to deploy worker nodes.

Prerequisites

  • You have an AWS account to purchase the offer. This account does not have to be the same account that is used to install the cluster.

Procedure

  1. Complete the OKD subscription from the AWS Marketplace.

  2. Record the AMI ID for your specific region. As part of the installation process, you must update the install-config.yaml file with this value before deploying the cluster.

Sample install-config.yaml file with AWS Marketplace worker nodes

  1. apiVersion: v1
  2. baseDomain: example.com
  3. compute:
  4. - hyperthreading: Enabled
  5. name: worker
  6. platform:
  7. aws:
  8. amiID: ami-06c4d345f7c207239 (1)
  9. type: m5.4xlarge
  10. replicas: 3
  11. metadata:
  12. name: test-cluster
  13. platform:
  14. aws:
  15. region: us-east-2 (2)
  16. sshKey: ssh-ed25519 AAAA...
  17. pullSecret: '{"auths": ...}'
1The AMI ID from your AWS Marketplace subscription.
2Your AMI ID is associated with a specific AWS region. When creating the installation configuration file, ensure that you select the same AWS region that you specified when configuring your subscription.

Installing the OpenShift CLI by downloading the binary

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

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

Installing the OpenShift CLI on Linux

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

Procedure

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

  2. Download oc.tar.gz.

  3. Unpack the archive:

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

    To check your PATH, execute the following command:

    1. $ echo $PATH

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

  1. $ oc <command>

Installing the OpenShift CLI on Windows

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

Procedure

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

  2. Download oc.zip.

  3. Unzip the archive with a ZIP program.

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

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

    1. C:\> path

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

  1. C:\> oc <command>

Installing the OpenShift CLI on macOS

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

Procedure

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

  2. Download oc.tar.gz.

  3. Unpack and unzip the archive.

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

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

    1. $ echo $PATH

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

  1. $ oc <command>

Preparing for the installation

Before you extend nodes to local zones, you must prepare certain resources for the cluster installation environment.

Obtaining the installation program

Before you install OKD, download the installation file on the host you are using for installation.

Prerequisites

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

Procedure

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

    The installation program creates several files on the computer that you use to install your cluster. You must keep the installation program and the files that the installation program creates after you finish installing the cluster. Both files are required to delete the cluster.

    Deleting the files created by the installation program does not remove your cluster, even if the cluster failed during installation. To remove your cluster, complete the OKD uninstallation procedures for your specific cloud provider.

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

    1. $ tar -xvf openshift-install-linux.tar.gz
  3. 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.

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.

Do not skip this procedure in production environments, where disaster recovery and debugging is required.

You must use a local key, not one that you configured with platform-specific approaches 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:

    1. $ ssh-keygen -t ed25519 -N '' -f <path>/<file_name> (1)
    1Specify 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 the Fedora cryptographic libraries that have been submitted to NIST for FIPS 140-2/140-3 Validation on only the x86_64, ppc64le, and s390x architectures, 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_ed25519.pub public key:

    1. $ cat ~/.ssh/id_ed25519.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.

    On some distributions, default SSH private key identities such as ~/.ssh/id_rsa and ~/.ssh/id_dsa are managed automatically.

    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_ed25519

    Example output

    1. Identity added: /home/<you>/<path>/<file_name> (<computer_name>)

Next steps

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

Creating the installation files for AWS

To install OKD on Amazon Web Services (AWS) using user-provisioned infrastructure, you must generate the files that the installation program needs to deploy your cluster and modify them so that the cluster creates only the machines that it will use. You generate and customize the install-config.yaml file, Kubernetes manifests, and Ignition config files. You also have the option to first set up a separate var partition during the preparation phases of installation.

Minimum resource requirements for cluster installation

Each cluster machine must meet the following minimum requirements:

Table 1. Minimum resource requirements
MachineOperating SystemvCPU [1]Virtual RAMStorageInput/Output Per Second (IOPS)[2]

Bootstrap

FCOS

4

16 GB

100 GB

300

Control plane

FCOS

4

16 GB

100 GB

300

Compute

FCOS

2

8 GB

100 GB

300

  1. One vCPU is equivalent to one physical core when simultaneous multithreading (SMT), or hyperthreading, is not enabled. When enabled, use the following formula to calculate the corresponding ratio: (threads per core × cores) × sockets = vCPUs.

  2. OKD and Kubernetes are sensitive to disk performance, and faster storage is recommended, particularly for etcd on the control plane nodes which require a 10 ms p99 fsync duration. Note that on many cloud platforms, storage size and IOPS scale together, so you might need to over-allocate storage volume to obtain sufficient performance.

  3. As with all user-provisioned installations, if you choose to use Fedora 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. Use of Fedora 7 compute machines is deprecated and has been removed in OKD 4.10 and later.

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

Tested instance types for AWS

The following Amazon Web Services (AWS) instance types have been tested with OKD for use with AWS Local Zones.

Use the machine types included in the following charts for your AWS instances. If you use an instance type that is not listed in the chart, ensure that the instance size you use matches the minimum resource requirements that are listed in “Minimum resource requirements for cluster installation”.

Machine types based on 64-bit x86 architecture for AWS Local Zones

  • c5.*

  • c5d.*

  • m6i.*

  • m5.*

  • r5.*

  • t3.*

Additional resources

  • See AWS Local Zones features in the AWS documentation for more information about AWS Local Zones and the supported instances types and services.

Creating the installation configuration file

Generate and customize the installation configuration file that the installation program needs to deploy your cluster.

Prerequisites

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

  • You checked that you are deploying your cluster to a region with an accompanying Fedora CoreOS (FCOS) AMI published by Red Hat. If you are deploying to a region that requires a custom AMI, such as an AWS GovCloud region, you must create the install-config.yaml file manually.

Procedure

  1. Create the install-config.yaml file.

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

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

      Specify an empty directory. Some installation assets, like bootstrap X.509 certificates have short expiration intervals, so you must not reuse an installation directory. If you want to reuse individual files from another cluster installation, you can copy them into your directory. However, the file names for the installation assets might change between releases. Use caution when copying installation files from an earlier OKD version.

    2. At the prompts, provide the configuration details for your cloud:

      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 aws as the platform to target.

      3. If you do not have an AWS profile stored on your computer, enter the AWS access key ID and secret access key for the user that you configured to run the installation program.

        The AWS access key ID and secret access key are stored in ~/.aws/credentials in the home directory of the current user on the installation host. You are prompted for the credentials by the installation program if the credentials for the exported profile are not present in the file. Any credentials that you provide to the installation program are stored in the file.

      4. Select the AWS region to deploy the cluster to. The region that you specify must be the same region that contains the Local Zone that you opted in to for your AWS account.

      5. Select the base domain for the Route 53 service that you configured for your cluster.

      6. Enter a descriptive name for your cluster.

      7. Paste the pull secret from the Red Hat OpenShift Cluster Manager. This field is optional.

  1. Optional: Back up the install-config.yaml file.

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

Edge compute pools and AWS Local Zones

Edge worker nodes are tainted worker nodes that run in AWS Local Zones locations.

When deploying a cluster that uses Local Zones, consider the following points:

  • Amazon EC2 instances in the Local Zones are more expensive than Amazon EC2 instances in the Availability Zones.

  • Latency between applications and end users is lower in Local Zones, and latency might vary by location. A latency impact exists for some workloads if, for example, ingress traffic is mixed between Local Zones and Availability Zones.

Generally, the maximum transmission unit (MTU) between an Amazon EC2 instance in a Local Zone and an Amazon EC2 instance in the Region is 1300. For more information, see How Local Zones work in the AWS documentation. The cluster network MTU must be always less than the EC2 MTU to account for the overhead. The specific overhead is determined by the network plugin, for example:

  • OVN-Kubernetes: 100 bytes

  • OpenShift SDN: 50 bytes

The network plugin can provide additional features, like IPsec, that also must be decreased the MTU. For additional information, see the documentation.

OKD 4.12 introduced a new compute pool, edge, that is designed for use in remote zones. The edge compute pool configuration is common between AWS Local Zones locations. Because of the type and size limitations of resources like EC2 and EBS on Local Zone resources, the default instance type can vary from the traditional worker pool.

The default Elastic Block Store (EBS) for Local Zone locations is gp2, which differs from the regular worker pool. The instance type used for each Local Zone on edge compute pool also might differ from worker pools, depending on the instance offerings on the zone.

The edge compute pool creates new labels that developers can use to deploy applications onto AWS Local Zones nodes. The new labels are:

  • node-role.kubernetes.io/edge=''

  • machine.openshift.io/zone-type=local-zone

  • machine.openshift.io/zone-group=$ZONE_GROUP_NAME

By default, the machine sets for the edge compute pool defines the taint of NoSchedule to prevent regular workloads from spreading on Local Zone instances. Users can only run user workloads if they define tolerations in the pod specification.

The following examples show install-config.yaml files that use the edge machine pool.

Configuration that uses an edge pool with a custom instance type

  1. apiVersion: v1
  2. baseDomain: devcluster.openshift.com
  3. metadata:
  4. name: ipi-localzone
  5. compute:
  6. - name: edge
  7. platform:
  8. aws:
  9. type: m5.4xlarge
  10. platform:
  11. aws:
  12. region: us-west-2
  13. pullSecret: '{"auths": ...}'
  14. sshKey: ssh-ed25519 AAAA...

Instance types differ between locations. To verify availability in the Local Zone in which the cluster runs, see the AWS documentation.

Configuration that uses an edge pool with a custom EBS type

  1. apiVersion: v1
  2. baseDomain: devcluster.openshift.com
  3. metadata:
  4. name: ipi-localzone
  5. compute:
  6. - name: edge
  7. platform:
  8. aws:
  9. rootVolume:
  10. type: gp3
  11. size: 120
  12. platform:
  13. aws:
  14. region: us-west-2
  15. pullSecret: '{"auths": ...}'
  16. sshKey: ssh-ed25519 AAAA...

EBS types differ between locations. Check the AWS documentation to verify availability in the Local Zone in which the cluster runs.

Configuration that uses an edge pool with custom security groups

  1. apiVersion: v1
  2. baseDomain: devcluster.openshift.com
  3. metadata:
  4. name: ipi-localzone
  5. compute:
  6. - name: edge
  7. platform:
  8. aws:
  9. additionalSecurityGroupIDs:
  10. - sg-1 (1)
  11. - sg-2
  12. platform:
  13. aws:
  14. region: us-west-2
  15. pullSecret: '{"auths": ...}'
  16. sshKey: ssh-ed25519 AAAA...
1Specify the name of the security group as it appears in the Amazon EC2 console, including the sg prefix.

Additional resources

Opting in to AWS Local Zones

If you plan to create the subnets in AWS Local Zones, you must opt in to each zone group separately.

Prerequisites

  • You have installed the AWS CLI.

  • You have determined an AWS Region for where you want to deploy your OKD cluster.

  • You have attached a permissive IAM policy to a user or role account that opts in to the zone group. Consider the following configuration as an example IAM policy:

    1. {
    2. "Version": "2012-10-17",
    3. "Statement": [
    4. {
    5. "Action": [
    6. "ec2:ModifyAvailabilityZoneGroup"
    7. ],
    8. "Effect": "Allow",
    9. "Resource": "*"
    10. }
    11. ]
    12. }

Procedure

  1. List the zones that are available in your AWS Region by running the following command:

    1. $ aws --region "<value_of_AWS_Region>" ec2 describe-availability-zones \
    2. --query 'AvailabilityZones[].[{ZoneName: ZoneName, GroupName: GroupName, Status: OptInStatus}]' \
    3. --filters Name=zone-type,Values=local-zone \
    4. --all-availability-zones

    Depending on the AWS Region, the list of available zones can be long. The command returns the following fields:

    ZoneName

    The name of the Local Zone.

    GroupName

    The group that comprises the zone. To opt in to the region, save the name.

    Status

    The status of the Local Zone group. If the status is not-opted-in, you must opt in the GroupName by running the commands that follow.

  2. Opt in to the zone group on your AWS account by running the following command:

    1. $ aws ec2 modify-availability-zone-group \
    2. --group-name "<value_of_GroupName>" \(1)
    3. --opt-in-status opted-in
    1For <value_of_GroupName>, specify the name of the group of the Local Zone where you want to create subnets. For example, specify us-east-1-nyc-1 to use the zone us-east-1-nyc-1a (US East New York).

Cluster installation options for an AWS Local Zones environment

To install an OKD cluster in an AWS Local Zones environment on AWS infrastructure, choose one of the following installation options:

  • Installing a cluster to quickly extend workers to edge compute pools, where the installation program automatically creates resources for the OKD cluster.

  • Installing a cluster on AWS into an existing VPC, where you must add Local Zone subnets to the install-config.yaml file.

Next steps

Choose one of the following options to install an OKD cluster in an AWS Local Zones environment:

Install a cluster quickly in AWS Local Zones

For OKD 4.14, you can quickly install a cluster on Amazon Web Services (AWS) to extend compute nodes to Local Zone locations. By using this installation route, the installation program automatically creates network resources and Local Zone subnets for each Local Zone that you defined in your configuration file. To customize the installation, you must modify parameters in the install-config.yaml file before you deploy the cluster.

Modifying an installation configuration file to use AWS Local Zones

Modify an install-config.yaml file to include AWS Local Zones.

Prerequisites

  • You have configured an AWS account.

  • You added your AWS keys and region to your local AWS profile by running aws configure.

  • You have read the configuration limitations that apply when you specify the installation program to automatically create subnets for your OKD cluster. See the section named “Cluster limitations in AWS Local Zones”.

  • You opted in to the Local Zone group for each zone.

  • You created an install-config.yaml file by using the procedure “Creating the installation configuration file”.

Procedure

  1. Modify the install-config.yaml file by specifying Local Zone names in the platform.aws.zones property of the edge compute pool. For example:

    1. ...
    2. platform:
    3. aws:
    4. region: <region_name> (1)
    5. compute:
    6. - name: edge
    7. platform:
    8. aws:
    9. zones: (2)
    10. - <local_zone_name>
    11. #...
    1The AWS Region name.
    2The list of Local Zone names that must belong in the same AWS Region.

    Example of a configuration to install a cluster in the us-west-2 AWS Region that extends edge nodes to Local Zones in Los Angeles and Las Vegas locations.

    1. apiVersion: v1
    2. baseDomain: example.com
    3. metadata:
    4. name: cluster-name
    5. platform:
    6. aws:
    7. region: us-west-2
    8. compute:
    9. - name: edge
    10. platform:
    11. aws:
    12. zones:
    13. - us-west-2-lax-1a
    14. - us-west-2-lax-1b
    15. - us-west-2-las-1a
    16. pullSecret: '{"auths": ...}'
    17. sshKey: 'ssh-ed25519 AAAA...'
    18. #...
  2. Deploy your cluster.

Additional resources

Next steps

Installing a cluster in an existing VPC that has Local Zone subnets

You can install a cluster into an existing Amazon Virtual Private Cloud (VPC) on Amazon Web Services (AWS). The installation program provisions the rest of the required infrastructure, which you can further customize. To customize the installation, modify parameters in the install-config.yaml file before you install the cluster.

Installing a cluster on AWS into an existing VPC requires extending workers to the edge of the Cloud Infrastructure by using AWS Local Zones.

Local Zone subnets extend regular workers’ nodes to edge networks. Each edge worker nodes runs a user workload. After you create an Amazon Web Service (AWS) Local Zone environment, and you deploy your cluster, you can use edge worker nodes to create user workloads in Local Zone subnets.

You can use a provided CloudFormation template to create the VPC and public subnets. Additionally, you can modify a template to customize your infrastructure or use the information that they contain to create AWS objects according to your company’s policies.

If you want to create private subnets, you must either modify the provided CloudFormation template or create your own template.

Creating a VPC in AWS

You can create a Virtual Private Cloud (VPC), and subnets for each Local Zone location, in Amazon Web Services (AWS) for your OKD cluster to extend worker nodes to the edge locations. You can further customize the VPC to meet your requirements, including VPN, route tables, and add new Local Zone subnets that are not included at initial deployment.

You can use the provided CloudFormation template and a custom parameter file to create a stack of AWS resources that represent the VPC.

If you do not use the provided CloudFormation template to create your AWS infrastructure, you must review the provided information and manually create the infrastructure. If your cluster does not initialize correctly, you might have to contact Red Hat support with your installation logs.

Prerequisites

  • You configured an AWS account.

  • You added your AWS keys and region to your local AWS profile by running aws configure.

  • You opted in to the AWS Local Zones on your AWS account.

Procedure

  1. Create a JSON file that contains the parameter values that the template requires:

    1. [
    2. {
    3. "ParameterKey": "VpcCidr", (1)
    4. "ParameterValue": "10.0.0.0/16" (2)
    5. },
    6. {
    7. "ParameterKey": "AvailabilityZoneCount", (3)
    8. "ParameterValue": "3" (4)
    9. },
    10. {
    11. "ParameterKey": "SubnetBits", (5)
    12. "ParameterValue": "12" (6)
    13. }
    14. ]
    1The CIDR block for the VPC.
    2Specify a CIDR block in the format x.x.x.x/16-24.
    3The number of availability zones to deploy the VPC in.
    4Specify an integer between 1 and 3.
    5The size of each subnet in each availability zone.
    6Specify an integer between 5 and 13, where 5 is /27 and 13 is /19.
  2. Copy the template from the CloudFormation template for the VPC section of this topic and save it as a YAML file on your computer. This template describes the VPC that your cluster requires.

  3. Launch the CloudFormation template to create a stack of AWS resources that represent the VPC by running the following command:

    You must enter the command on a single line.

    1. $ aws cloudformation create-stack --stack-name <name> \ (1)
    2. --template-body file://<template>.yaml \ (2)
    3. --parameters file://<parameters>.json (3)
    1<name> is the name for the CloudFormation stack, such as cluster-vpc. You need the name of this stack if you remove the cluster.
    2<template> is the relative path to and name of the CloudFormation template YAML file that you saved.
    3<parameters> is the relative path to and name of the CloudFormation parameters JSON file.

    Example output

    1. arn:aws:cloudformation:us-east-1:123456789012:stack/cluster-vpc/dbedae40-2fd3-11eb-820e-12a48460849f
  4. Confirm that the template components exist by running the following command:

    1. $ aws cloudformation describe-stacks --stack-name <name>

    After the StackStatus displays CREATE_COMPLETE, the output displays values for the following parameters. You must provide these parameter values to the other CloudFormation templates that you run to create your cluster:

    VpcId

    The ID of your VPC.

    PublicSubnetIds

    The IDs of the new public subnets.

    PrivateSubnetIds

    The IDs of the new private subnets.

    PublicRouteTableId

    The ID of the new public route table ID.

Creating a subnet in AWS Local Zones

You must create a subnet in AWS Local Zones before you configure a worker machineset for your OKD cluster.

You must repeat the following process for each Local Zone you want to deploy worker nodes to.

You can use the provided CloudFormation template and a custom parameter file to create a stack of AWS resources that represent the subnet.

If you do not use the provided CloudFormation template to create your AWS infrastructure, you must review the provided information and manually create the infrastructure. If your cluster does not initialize correctly, you might have to contact Red Hat support with your installation logs.

Prerequisites

  • You configured an AWS account.

  • You added your AWS keys and region to your local AWS profile by running aws configure.

  • You opted in to the Local Zone group.

Procedure

  1. Create a JSON file that contains the parameter values that the template requires:

    1. [
    2. {
    3. "ParameterKey": "VpcId",
    4. "ParameterValue": "<value_of_VpcId>" (1)
    5. },
    6. {
    7. "ParameterKey": "PublicRouteTableId",
    8. "ParameterValue": "<value_of_PublicRouteTableId>" (2)
    9. },
    10. {
    11. "ParameterKey": "ZoneName",
    12. "ParameterValue": "<value_of_ZoneName>" (3)
    13. },
    14. {
    15. "ParameterKey": "SubnetName",
    16. "ParameterValue": "<value_of_SubnetName>"
    17. },
    18. {
    19. "ParameterKey": "PublicSubnetCidr",
    20. "ParameterValue": "10.0.192.0/20" (4)
    21. }
    22. ]
    1Specify the VPC ID, which is the value VpcID in the output of the CloudFormation template. for the VPC.
    2Specify the Route Table ID, which is the value of the PublicRouteTableId in the CloudFormation stack for the VPC.
    3Specify the AWS Local Zone name, which is the value of the ZoneName field in the AvailabilityZones object that you retrieve in the section “Opting in to AWS Local Zones”.
    4Specify a CIDR block that is used to create the Local Zone subnet. This block must be part of the VPC CIDR block VpcCidr.
  2. Copy the template from the CloudFormation template for the subnet section of this topic and save it as a YAML file on your computer. This template describes the VPC that your cluster requires.

  3. Launch the CloudFormation template to create a stack of AWS resources that represent the VPC by running the following command:

    You must enter the command on a single line.

    1. $ aws cloudformation create-stack --stack-name <subnet_stack_name> \ (1)
    2. --template-body file://<template>.yaml \ (2)
    3. --parameters file://<parameters>.json (3)
    1<subnet_stack_name> is the name for the CloudFormation stack, such as cluster-lz-<local_zone_shortname>. You need the name of this stack if you remove the cluster.
    2<template> is the relative path to and name of the CloudFormation template YAML file that you saved.
    3<parameters> is the relative path to and name of the CloudFormation parameters JSON file.

    Example output

    1. arn:aws:cloudformation:us-east-1:123456789012:stack/<subnet_stack_name>/dbedae40-2fd3-11eb-820e-12a48460849f
  4. Confirm that the template components exist by running the following command:

    1. $ aws cloudformation describe-stacks --stack-name <subnet_stack_name>

    After the StackStatus displays CREATE_COMPLETE, the output displays values for the following parameters. You must provide these parameter values to the other CloudFormation templates that you run to create your cluster:

    PublicSubnetIds

    The IDs of the new public subnets.

CloudFormation template for the VPC

You can use the following CloudFormation template to deploy the VPC that you need for your OKD cluster.

CloudFormation template for the VPC

  1. AWSTemplateFormatVersion: 2010-09-09
  2. Description: Template for Best Practice VPC with 1-3 AZs
  3. Parameters:
  4. VpcCidr:
  5. AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-4]))$
  6. ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-24.
  7. Default: 10.0.0.0/16
  8. Description: CIDR block for VPC.
  9. Type: String
  10. AvailabilityZoneCount:
  11. ConstraintDescription: "The number of availability zones. (Min: 1, Max: 3)"
  12. MinValue: 1
  13. MaxValue: 3
  14. Default: 1
  15. Description: "How many AZs to create VPC subnets for. (Min: 1, Max: 3)"
  16. Type: Number
  17. SubnetBits:
  18. ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/19-27.
  19. MinValue: 5
  20. MaxValue: 13
  21. Default: 12
  22. Description: "Size of each subnet to create within the availability zones. (Min: 5 = /27, Max: 13 = /19)"
  23. Type: Number
  24. Metadata:
  25. AWS::CloudFormation::Interface:
  26. ParameterGroups:
  27. - Label:
  28. default: "Network Configuration"
  29. Parameters:
  30. - VpcCidr
  31. - SubnetBits
  32. - Label:
  33. default: "Availability Zones"
  34. Parameters:
  35. - AvailabilityZoneCount
  36. ParameterLabels:
  37. AvailabilityZoneCount:
  38. default: "Availability Zone Count"
  39. VpcCidr:
  40. default: "VPC CIDR"
  41. SubnetBits:
  42. default: "Bits Per Subnet"
  43. Conditions:
  44. DoAz3: !Equals [3, !Ref AvailabilityZoneCount]
  45. DoAz2: !Or [!Equals [2, !Ref AvailabilityZoneCount], Condition: DoAz3]
  46. Resources:
  47. VPC:
  48. Type: "AWS::EC2::VPC"
  49. Properties:
  50. EnableDnsSupport: "true"
  51. EnableDnsHostnames: "true"
  52. CidrBlock: !Ref VpcCidr
  53. PublicSubnet:
  54. Type: "AWS::EC2::Subnet"
  55. Properties:
  56. VpcId: !Ref VPC
  57. CidrBlock: !Select [0, !Cidr [!Ref VpcCidr, 6, !Ref SubnetBits]]
  58. AvailabilityZone: !Select
  59. - 0
  60. - Fn::GetAZs: !Ref "AWS::Region"
  61. PublicSubnet2:
  62. Type: "AWS::EC2::Subnet"
  63. Condition: DoAz2
  64. Properties:
  65. VpcId: !Ref VPC
  66. CidrBlock: !Select [1, !Cidr [!Ref VpcCidr, 6, !Ref SubnetBits]]
  67. AvailabilityZone: !Select
  68. - 1
  69. - Fn::GetAZs: !Ref "AWS::Region"
  70. PublicSubnet3:
  71. Type: "AWS::EC2::Subnet"
  72. Condition: DoAz3
  73. Properties:
  74. VpcId: !Ref VPC
  75. CidrBlock: !Select [2, !Cidr [!Ref VpcCidr, 6, !Ref SubnetBits]]
  76. AvailabilityZone: !Select
  77. - 2
  78. - Fn::GetAZs: !Ref "AWS::Region"
  79. InternetGateway:
  80. Type: "AWS::EC2::InternetGateway"
  81. GatewayToInternet:
  82. Type: "AWS::EC2::VPCGatewayAttachment"
  83. Properties:
  84. VpcId: !Ref VPC
  85. InternetGatewayId: !Ref InternetGateway
  86. PublicRouteTable:
  87. Type: "AWS::EC2::RouteTable"
  88. Properties:
  89. VpcId: !Ref VPC
  90. PublicRoute:
  91. Type: "AWS::EC2::Route"
  92. DependsOn: GatewayToInternet
  93. Properties:
  94. RouteTableId: !Ref PublicRouteTable
  95. DestinationCidrBlock: 0.0.0.0/0
  96. GatewayId: !Ref InternetGateway
  97. PublicSubnetRouteTableAssociation:
  98. Type: "AWS::EC2::SubnetRouteTableAssociation"
  99. Properties:
  100. SubnetId: !Ref PublicSubnet
  101. RouteTableId: !Ref PublicRouteTable
  102. PublicSubnetRouteTableAssociation2:
  103. Type: "AWS::EC2::SubnetRouteTableAssociation"
  104. Condition: DoAz2
  105. Properties:
  106. SubnetId: !Ref PublicSubnet2
  107. RouteTableId: !Ref PublicRouteTable
  108. PublicSubnetRouteTableAssociation3:
  109. Condition: DoAz3
  110. Type: "AWS::EC2::SubnetRouteTableAssociation"
  111. Properties:
  112. SubnetId: !Ref PublicSubnet3
  113. RouteTableId: !Ref PublicRouteTable
  114. PrivateSubnet:
  115. Type: "AWS::EC2::Subnet"
  116. Properties:
  117. VpcId: !Ref VPC
  118. CidrBlock: !Select [3, !Cidr [!Ref VpcCidr, 6, !Ref SubnetBits]]
  119. AvailabilityZone: !Select
  120. - 0
  121. - Fn::GetAZs: !Ref "AWS::Region"
  122. PrivateRouteTable:
  123. Type: "AWS::EC2::RouteTable"
  124. Properties:
  125. VpcId: !Ref VPC
  126. PrivateSubnetRouteTableAssociation:
  127. Type: "AWS::EC2::SubnetRouteTableAssociation"
  128. Properties:
  129. SubnetId: !Ref PrivateSubnet
  130. RouteTableId: !Ref PrivateRouteTable
  131. NAT:
  132. DependsOn:
  133. - GatewayToInternet
  134. Type: "AWS::EC2::NatGateway"
  135. Properties:
  136. AllocationId:
  137. "Fn::GetAtt":
  138. - EIP
  139. - AllocationId
  140. SubnetId: !Ref PublicSubnet
  141. EIP:
  142. Type: "AWS::EC2::EIP"
  143. Properties:
  144. Domain: vpc
  145. Route:
  146. Type: "AWS::EC2::Route"
  147. Properties:
  148. RouteTableId:
  149. Ref: PrivateRouteTable
  150. DestinationCidrBlock: 0.0.0.0/0
  151. NatGatewayId:
  152. Ref: NAT
  153. PrivateSubnet2:
  154. Type: "AWS::EC2::Subnet"
  155. Condition: DoAz2
  156. Properties:
  157. VpcId: !Ref VPC
  158. CidrBlock: !Select [4, !Cidr [!Ref VpcCidr, 6, !Ref SubnetBits]]
  159. AvailabilityZone: !Select
  160. - 1
  161. - Fn::GetAZs: !Ref "AWS::Region"
  162. PrivateRouteTable2:
  163. Type: "AWS::EC2::RouteTable"
  164. Condition: DoAz2
  165. Properties:
  166. VpcId: !Ref VPC
  167. PrivateSubnetRouteTableAssociation2:
  168. Type: "AWS::EC2::SubnetRouteTableAssociation"
  169. Condition: DoAz2
  170. Properties:
  171. SubnetId: !Ref PrivateSubnet2
  172. RouteTableId: !Ref PrivateRouteTable2
  173. NAT2:
  174. DependsOn:
  175. - GatewayToInternet
  176. Type: "AWS::EC2::NatGateway"
  177. Condition: DoAz2
  178. Properties:
  179. AllocationId:
  180. "Fn::GetAtt":
  181. - EIP2
  182. - AllocationId
  183. SubnetId: !Ref PublicSubnet2
  184. EIP2:
  185. Type: "AWS::EC2::EIP"
  186. Condition: DoAz2
  187. Properties:
  188. Domain: vpc
  189. Route2:
  190. Type: "AWS::EC2::Route"
  191. Condition: DoAz2
  192. Properties:
  193. RouteTableId:
  194. Ref: PrivateRouteTable2
  195. DestinationCidrBlock: 0.0.0.0/0
  196. NatGatewayId:
  197. Ref: NAT2
  198. PrivateSubnet3:
  199. Type: "AWS::EC2::Subnet"
  200. Condition: DoAz3
  201. Properties:
  202. VpcId: !Ref VPC
  203. CidrBlock: !Select [5, !Cidr [!Ref VpcCidr, 6, !Ref SubnetBits]]
  204. AvailabilityZone: !Select
  205. - 2
  206. - Fn::GetAZs: !Ref "AWS::Region"
  207. PrivateRouteTable3:
  208. Type: "AWS::EC2::RouteTable"
  209. Condition: DoAz3
  210. Properties:
  211. VpcId: !Ref VPC
  212. PrivateSubnetRouteTableAssociation3:
  213. Type: "AWS::EC2::SubnetRouteTableAssociation"
  214. Condition: DoAz3
  215. Properties:
  216. SubnetId: !Ref PrivateSubnet3
  217. RouteTableId: !Ref PrivateRouteTable3
  218. NAT3:
  219. DependsOn:
  220. - GatewayToInternet
  221. Type: "AWS::EC2::NatGateway"
  222. Condition: DoAz3
  223. Properties:
  224. AllocationId:
  225. "Fn::GetAtt":
  226. - EIP3
  227. - AllocationId
  228. SubnetId: !Ref PublicSubnet3
  229. EIP3:
  230. Type: "AWS::EC2::EIP"
  231. Condition: DoAz3
  232. Properties:
  233. Domain: vpc
  234. Route3:
  235. Type: "AWS::EC2::Route"
  236. Condition: DoAz3
  237. Properties:
  238. RouteTableId:
  239. Ref: PrivateRouteTable3
  240. DestinationCidrBlock: 0.0.0.0/0
  241. NatGatewayId:
  242. Ref: NAT3
  243. S3Endpoint:
  244. Type: AWS::EC2::VPCEndpoint
  245. Properties:
  246. PolicyDocument:
  247. Version: 2012-10-17
  248. Statement:
  249. - Effect: Allow
  250. Principal: '*'
  251. Action:
  252. - '*'
  253. Resource:
  254. - '*'
  255. RouteTableIds:
  256. - !Ref PublicRouteTable
  257. - !Ref PrivateRouteTable
  258. - !If [DoAz2, !Ref PrivateRouteTable2, !Ref "AWS::NoValue"]
  259. - !If [DoAz3, !Ref PrivateRouteTable3, !Ref "AWS::NoValue"]
  260. ServiceName: !Join
  261. - ''
  262. - - com.amazonaws.
  263. - !Ref 'AWS::Region'
  264. - .s3
  265. VpcId: !Ref VPC
  266. Outputs:
  267. VpcId:
  268. Description: ID of the new VPC.
  269. Value: !Ref VPC
  270. PublicSubnetIds:
  271. Description: Subnet IDs of the public subnets.
  272. Value:
  273. !Join [
  274. ",",
  275. [!Ref PublicSubnet, !If [DoAz2, !Ref PublicSubnet2, !Ref "AWS::NoValue"], !If [DoAz3, !Ref PublicSubnet3, !Ref "AWS::NoValue"]]
  276. ]
  277. PrivateSubnetIds:
  278. Description: Subnet IDs of the private subnets.
  279. Value:
  280. !Join [
  281. ",",
  282. [!Ref PrivateSubnet, !If [DoAz2, !Ref PrivateSubnet2, !Ref "AWS::NoValue"], !If [DoAz3, !Ref PrivateSubnet3, !Ref "AWS::NoValue"]]
  283. ]
  284. PublicRouteTableId:
  285. Description: Public Route table ID
  286. Value: !Ref PublicRouteTable

AWS security groups

By default, the installation program creates and attaches security groups to control plane and compute machines. The rules associated with the default security groups cannot be modified.

However, you can apply additional existing AWS security groups, which are associated with your existing VPC, to control plane and compute machines. Applying custom security groups can help you meet the security needs of your organization, in such cases where you need to control the incoming or outgoing traffic of these machines.

As part of the installation process, you apply custom security groups by modifying the install-config.yaml file before deploying the cluster.

For more information, see “Edge compute pools and AWS Local Zones”.

CloudFormation template for the subnet that uses AWS Local Zones

You can use the following CloudFormation template to deploy the subnet that you need for your OKD cluster that uses AWS Local Zones.

CloudFormation template for the subnet

  1. # CloudFormation template used to create Local Zone subnets and dependencies
  2. AWSTemplateFormatVersion: 2010-09-09
  3. Description: Template for create Public Local Zone subnets
  4. Parameters:
  5. VpcId:
  6. Description: VPC Id
  7. Type: String
  8. ZoneName:
  9. Description: Local Zone Name (Example us-east-1-nyc-1a)
  10. Type: String
  11. SubnetName:
  12. Description: Local Zone Name (Example cluster-public-us-east-1-nyc-1a)
  13. Type: String
  14. PublicRouteTableId:
  15. Description: Public Route Table ID to associate the Local Zone subnet
  16. Type: String
  17. PublicSubnetCidr:
  18. AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-4]))$
  19. ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-24.
  20. Default: 10.0.128.0/20
  21. Description: CIDR block for Public Subnet
  22. Type: String
  23. Resources:
  24. PublicSubnet:
  25. Type: "AWS::EC2::Subnet"
  26. Properties:
  27. VpcId: !Ref VpcId
  28. CidrBlock: !Ref PublicSubnetCidr
  29. AvailabilityZone: !Ref ZoneName
  30. Tags:
  31. - Key: Name
  32. Value: !Ref SubnetName
  33. - Key: kubernetes.io/cluster/unmanaged
  34. Value: "true"
  35. PublicSubnetRouteTableAssociation:
  36. Type: "AWS::EC2::SubnetRouteTableAssociation"
  37. Properties:
  38. SubnetId: !Ref PublicSubnet
  39. RouteTableId: !Ref PublicRouteTableId
  40. Outputs:
  41. PublicSubnetIds:
  42. Description: Subnet IDs of the public subnets.
  43. Value:
  44. !Join ["", [!Ref PublicSubnet]]

Additional resources

Modifying an installation configuration file to use AWS Local Zones subnets

Modify an install-config.yaml file to include AWS Local Zones subnets.

Prerequisites

  • You created subnets by using the procedure “Creating a subnet in AWS Local Zones”.

  • You created an install-config.yaml file by using the procedure “Creating the installation configuration file”.

Procedure

  • Modify the install-config.yaml configuration file by specifying Local Zone subnets in the platform.aws.subnets property, as demonstrated in the following example:

    1. ...
    2. platform:
    3. aws:
    4. region: us-west-2
    5. subnets: (1)
    6. - publicSubnetId-1
    7. - publicSubnetId-2
    8. - publicSubnetId-3
    9. - privateSubnetId-1
    10. - privateSubnetId-2
    11. - privateSubnetId-3
    12. - publicSubnetId-LocalZone-1
    13. ...
    1List of subnets created in the Availability and Local Zones.

Additional resources

Deploying the cluster

You can install OKD on a compatible cloud platform.

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

Prerequisites

  • You have configured an account with the cloud platform that hosts your cluster.

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

  • You have verified that the cloud provider account on your host has the correct permissions to deploy the cluster. An account with incorrect permissions causes the installation process to fail with an error message that displays the missing permissions.

Procedure

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

    1. $ ./openshift-install create cluster --dir <installation_directory> \ (1)
    2. --log-level=info (2)
    1For <installation_directory>, specify the location of your customized ./install-config.yaml file.
    2To view different installation details, specify warn, debug, or error instead of info.
  2. Optional: Remove or disable the AdministratorAccess policy from the IAM account that you used to install the cluster.

    The elevated permissions provided by the AdministratorAccess policy are required only during installation.

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.

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

Example output

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

Next steps

Logging in to the cluster by using the CLI

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

Prerequisites

  • You deployed an OKD cluster.

  • You installed the oc CLI.

Procedure

  1. Export the kubeadmin credentials:

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

    1. $ oc whoami

    Example output

    1. system:admin

Logging in to the cluster by using the web console

The kubeadmin user exists by default after an OKD installation. You can log in to your cluster as the kubeadmin user by using the OKD web console.

Prerequisites

  • You have access to the installation host.

  • You completed a cluster installation and all cluster Operators are available.

Procedure

  1. Obtain the password for the kubeadmin user from the kubeadmin-password file on the installation host:

    1. $ cat <installation_directory>/auth/kubeadmin-password

    Alternatively, you can obtain the kubeadmin password from the <installation_directory>/.openshift_install.log log file on the installation host.

  2. List the OKD web console route:

    1. $ oc get routes -n openshift-console | grep 'console-openshift'

    Alternatively, you can obtain the OKD route from the <installation_directory>/.openshift_install.log log file on the installation host.

    Example output

    1. console console-openshift-console.apps.<cluster_name>.<base_domain> console https reencrypt/Redirect None
  3. Navigate to the route detailed in the output of the preceding command in a web browser and log in as the kubeadmin user.

Additional resources

Verifying nodes that were created with edge compute pool

After you install a cluster that uses AWS Local Zones, check the status of the machine that was created by the machine set manifests created at install time.

  1. To check the machine sets created from the subnet you added to the install-config.yaml file, run the following command:

    1. $ oc get machineset -n openshift-machine-api

    Example output

    1. NAME DESIRED CURRENT READY AVAILABLE AGE
    2. cluster-7xw5g-edge-us-east-1-nyc-1a 1 1 1 1 3h4m
    3. cluster-7xw5g-worker-us-east-1a 1 1 1 1 3h4m
    4. cluster-7xw5g-worker-us-east-1b 1 1 1 1 3h4m
    5. cluster-7xw5g-worker-us-east-1c 1 1 1 1 3h4m
  2. To check the machines that were created from the machine sets, run the following command:

    1. $ oc get machines -n openshift-machine-api

    Example output

    1. NAME PHASE TYPE REGION ZONE AGE
    2. cluster-7xw5g-edge-us-east-1-nyc-1a-wbclh Running c5d.2xlarge us-east-1 us-east-1-nyc-1a 3h
    3. cluster-7xw5g-master-0 Running m6i.xlarge us-east-1 us-east-1a 3h4m
    4. cluster-7xw5g-master-1 Running m6i.xlarge us-east-1 us-east-1b 3h4m
    5. cluster-7xw5g-master-2 Running m6i.xlarge us-east-1 us-east-1c 3h4m
    6. cluster-7xw5g-worker-us-east-1a-rtp45 Running m6i.xlarge us-east-1 us-east-1a 3h
    7. cluster-7xw5g-worker-us-east-1b-glm7c Running m6i.xlarge us-east-1 us-east-1b 3h
    8. cluster-7xw5g-worker-us-east-1c-qfvz4 Running m6i.xlarge us-east-1 us-east-1c 3h
  3. To check nodes with edge roles, run the following command:

    1. $ oc get nodes -l node-role.kubernetes.io/edge

    Example output

    1. NAME STATUS ROLES AGE VERSION
    2. ip-10-0-207-188.ec2.internal Ready edge,worker 172m v1.25.2+d2e245f

Additional resources

Next steps