Changing instance types with AWS installation

Solution Verified - Updated -

Environment

  • Red Hat OpenShift Container Platform
    • 4.x

Issue

  • How can the installer take updated instance type as per the cluster requirement?
  • Can we customize the instance type for the aws installation?

Resolution

  • The instance type is default set to configure an instance with m4.large
[root@localhost openshift]# less 99_openshift-cluster-api_master-machines.yaml | grep -A2 instance
        instanceType: m4.large
        keyName: null
        kind: AWSMachineProviderConfig
--
        instanceType: m4.large
        keyName: null
        kind: AWSMachineProviderConfig
--
        instanceType: m4.large
        keyName: null
        kind: AWSMachineProviderConfig
[root@localhost openshift]# 

  • This instance type could be modified and you can find the manifest details running the following command,
[root@localhost testing]# openshift-install create manifests
? SSH Public Key /home/user1/.ssh/id_rsa.pub
? Platform aws
? Region us-east-2
? Base Domain aws.example.com
? Cluster Name abcd
? Pull Secret [? for help] **************************************************************************************************************************************************INFO Consuming "OpenshiftServiceCertSignerSecret" from target directory 
INFO Consuming "HostEtcdServiceEndpointsKubeSystem" from target directory 
INFO Consuming "OpenshiftClusterAPINamespace" from target directory 
INFO Consuming "HostEtcdServiceKubeSystem" from target directory 
INFO Consuming "MachineConfigServerTLSSecret" from target directory 
INFO Consuming "KubeSystemSecretEtcdClient" from target directory 
INFO Consuming "CVOOverrides" from target directory 
INFO Consuming "KubeCloudConfig" from target directory 
INFO Consuming "Pull" from target directory       
INFO Consuming "KubeSystemConfigmapRootCA" from target directory 
INFO Consuming "KubeSystemConfigmapEtcdServingCA" from target directory 
INFO Consuming "OpenshiftMachineConfigOperator" from target directory 
INFO Consuming "OpenshiftServiceCertSignerNamespace" from target directory 
INFO Consuming "EtcdServiceKubeSystem" from target directory 
INFO Consuming "RoleCloudCredsSecretReader" from target directory 
INFO Consuming "KubeadminPasswordSecret" from target directory 
INFO Consuming "BindingDiscovery" from target directory 
INFO Consuming "CloudCredsSecret" from target directory 

[root@localhost testing]# ls
bootstrap.ign  cert.txt  kubeconfig  manifests  metadata.json  openshift  terraform.tfstate  terraform.tfvars
[root@localhost testing]# cd openshift/
[root@localhost openshift]# ls
99_binding-discovery.yaml          99_openshift-cluster-api_cluster.yaml                  99_openshift-cluster-api_worker-machineset.yaml
99_cloud-creds-secret.yaml         99_openshift-cluster-api_master-machines.yaml          99_openshift-cluster-api_worker-user-data-secret.yaml
99_kubeadmin-password-secret.yaml  99_openshift-cluster-api_master-user-data-secret.yaml  99_role-cloud-creds-secret-reader.yaml
  • Once the manifests are created, you can open 99_openshift-cluster-api_master-machines.yaml to edit the instance type for masters.
  • To get more information about instance types, refer this documentation
  • Similarly 99_openshift-cluster-api_worker-machineset.yaml file contains worker node details and you can edit the instance type for your worker nodes.

  • Once the changes are done you can run the following command in the same directory so that changes are consumed from the target directory to pull up a new cluster.

[root@localhost testing]# openshift-install create cluster

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments