|
| 1 | +//Module included in the following assembly |
| 2 | +// |
| 3 | +//post_installation_configuration/cluster-tasks.adoc |
| 4 | + |
| 5 | +:_content-type: PROCEDURE |
| 6 | +[id="multi-architecture-modify-machine-set-aws_{context}"] |
| 7 | + |
| 8 | += Adding an ARM64 compute machine set to your cluster |
| 9 | + |
| 10 | +To configure a cluster with multi-architecture compute machines, you must create a AWS ARM64 compute machine set. This adds ARM64 compute nodes to your cluster so that your cluster has multi-architecture compute machines. |
| 11 | + |
| 12 | +.Prerequisites |
| 13 | + |
| 14 | +* You installed the OpenShift CLI (`oc`). |
| 15 | +* You used the installation program to create an AMD64 single-architecture AWS cluster with the multi-architecture installer binary. |
| 16 | + |
| 17 | + |
| 18 | +.Procedure |
| 19 | +* Create and modify a compute machine set, this will control the ARM64 compute nodes in your cluster. |
| 20 | ++ |
| 21 | +-- |
| 22 | +[source,terminal] |
| 23 | +---- |
| 24 | +$ oc create -f aws-arm64-machine-set-0.yaml |
| 25 | +---- |
| 26 | +.Sample YAML compute machine set to deploy an ARM64 compute node |
| 27 | + |
| 28 | +[source,yaml] |
| 29 | +---- |
| 30 | +apiVersion: machine.openshift.io/v1beta1 |
| 31 | +kind: MachineSet |
| 32 | +metadata: |
| 33 | + labels: |
| 34 | + machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1> |
| 35 | + name: <infrastructure_id>-aws-arm64-machine-set-0 <1> |
| 36 | + namespace: openshift-machine-api |
| 37 | +spec: |
| 38 | + replicas: 1 |
| 39 | + selector: |
| 40 | + matchLabels: |
| 41 | + machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1> |
| 42 | + machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<role>-<zone> <2> |
| 43 | + template: |
| 44 | + metadata: |
| 45 | + labels: |
| 46 | + machine.openshift.io/cluster-api-cluster: <infrastructure_id> |
| 47 | + machine.openshift.io/cluster-api-machine-role: <role> <3> |
| 48 | + machine.openshift.io/cluster-api-machine-type: <role> <3> |
| 49 | + machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<role>-<zone> <2> |
| 50 | + spec: |
| 51 | + metadata: |
| 52 | + labels: |
| 53 | + node-role.kubernetes.io/<role>: "" |
| 54 | + providerSpec: |
| 55 | + value: |
| 56 | + ami: |
| 57 | + id: ami-02a574449d4f4d280 <4> |
| 58 | + apiVersion: awsproviderconfig.openshift.io/v1beta1 |
| 59 | + blockDevices: |
| 60 | + - ebs: |
| 61 | + iops: 0 |
| 62 | + volumeSize: 120 |
| 63 | + volumeType: gp2 |
| 64 | + credentialsSecret: |
| 65 | + name: aws-cloud-credentials |
| 66 | + deviceIndex: 0 |
| 67 | + iamInstanceProfile: |
| 68 | + id: <infrastructure_id>-worker-profile <1> |
| 69 | + instanceType: m6g.xlarge <5> |
| 70 | + kind: AWSMachineProviderConfig |
| 71 | + placement: |
| 72 | + availabilityZone: us-east-1a <6> |
| 73 | + region: <region> <7> |
| 74 | + securityGroups: |
| 75 | + - filters: |
| 76 | + - name: tag:Name |
| 77 | + values: |
| 78 | + - <infrastructure_id>-worker-sg <1> |
| 79 | + subnet: |
| 80 | + filters: |
| 81 | + - name: tag:Name |
| 82 | + values: |
| 83 | + - <infrastructure_id>-private-<zone> |
| 84 | + tags: |
| 85 | + - name: kubernetes.io/cluster/<infrastructure_id> <1> |
| 86 | + value: owned |
| 87 | + - name: <custom_tag_name> |
| 88 | + value: <custom_tag_value> |
| 89 | + userDataSecret: |
| 90 | + name: worker-user-data |
| 91 | +---- |
| 92 | +<1> Specify the infrastructure ID that is based on the cluster ID that you set when you provisioned the cluster. If you have the OpenShift CLI installed, you can obtain the infrastructure ID by running the following command: |
| 93 | ++ |
| 94 | +[source,terminal] |
| 95 | +---- |
| 96 | +$ oc get -o jsonpath=‘{.status.infrastructureName}{“\n”}’ infrastructure cluster |
| 97 | +---- |
| 98 | +<2> Specify the infrastructure ID, role node label, and zone. |
| 99 | +<3> Specify the role node label to add. |
| 100 | +<4> Specify an ARM64 supported Red Hat Enterprise Linux CoreOS (RHCOS) Amazon Machine Image (AMI) for your AWS zone for your OpenShift Container Platform nodes. |
| 101 | ++ |
| 102 | +[source,terminal] |
| 103 | +---- |
| 104 | +$ oc get configmap/coreos-bootimages / |
| 105 | + -n openshift-machine-config-operator / |
| 106 | + -o jsonpath='{.data.stream}' | jq / |
| 107 | + -r '.architectures.<arch>.images.aws.regions."<region>".image' |
| 108 | +---- |
| 109 | +<5> Specify an ARM64 supported machine type. For more information, refer to "Tested instance types for AWS 64-bit ARM" |
| 110 | +<6> Specify the zone, for example `us-east-1a`. Ensure that the zone you select offers 64-bit ARM machines. |
| 111 | +<7> Specify the region, for example, `us-east-1`. Ensure that the zone you select offers 64-bit ARM machines. |
| 112 | +-- |
| 113 | + |
| 114 | +.Verification |
| 115 | + |
| 116 | +. View the list of compute machine sets by entering the following command: |
| 117 | ++ |
| 118 | +[source,terminal] |
| 119 | +---- |
| 120 | +$ oc get machineset -n openshift-machine-api |
| 121 | +---- |
| 122 | +You can then see your created ARM64 machine set. |
| 123 | ++ |
| 124 | +.Example output |
| 125 | +[source,terminal] |
| 126 | +---- |
| 127 | +NAME DESIRED CURRENT READY AVAILABLE AGE |
| 128 | +<infrastructure_id>-aws-arm64-machine-set-0 2 2 2 2 10m |
| 129 | +---- |
| 130 | +. You can check that the nodes are ready and scheduable with the following command: |
| 131 | ++ |
| 132 | +[source,terminal] |
| 133 | +---- |
| 134 | +$ oc get nodes |
| 135 | +---- |
0 commit comments