Bug 2053605 - [DOC] Add a section to instruct how to scale up manually the openshift nodes
Summary: [DOC] Add a section to instruct how to scale up manually the openshift nodes
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 4.9
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.6.z
Assignee: Servesha
QA Contact: Sunil Choudhary
Latha S
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-11 15:35 UTC by Christian Passarelli
Modified: 2022-04-26 01:49 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-25 08:01:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Article) 6386971 0 None None None 2022-02-23 11:21:54 UTC

Description Christian Passarelli 2022-02-11 15:35:04 UTC
Document URL: 
https://docs.openshift.com/container-platform/4.9/nodes/

Section Number and Name: 
N/A

Describe the issue: 
Is not present any session related to how to scale-up control-plane nodes.

Suggestions for improvement: 
Add instruction to scale-up nodes.

Additional information: 
For example, related to AWS we have a couple of solutions in the knowledge base and they are also discordant:
- https://access.redhat.com/solutions/6409091
- https://access.redhat.com/solutions/5837161

So having a clear session in the documentation could clarify how to do it.
Testing the simple instance type change in AWS seems to work fine.

Comment 7 sunzhaohua 2022-04-15 07:21:25 UTC
I tested with worker machine and master machine,  this doesn't work, can't change machine instance type.

worker machine:
1. create a new worker machine without machineset
worker.yaml
apiVersion: machine.openshift.io/v1beta1
kind: Machine
metadata:
  labels:
    machine.openshift.io/cluster-api-cluster: zhsunaws15-sqrlq
    machine.openshift.io/cluster-api-machine-role: worker
    machine.openshift.io/cluster-api-machine-type: worker
    machine.openshift.io/instance-type: m6i.xlarge
    machine.openshift.io/region: us-east-2
    machine.openshift.io/zone: us-east-2c
  name: zhsunaws15-sqrlq-worker-us-east-2c-test
  namespace: openshift-machine-api
  ownerReferences:
  - apiVersion: machine.openshift.io/v1beta1
    blockOwnerDeletion: true
    controller: true
    kind: MachineSet
    name: zhsunaws15-sqrlq-worker-us-east-2c
    uid: 71bab46f-2e0e-4e41-a13e-23a4115a06fe
spec:
  lifecycleHooks: {}
  providerSpec:
    value:
      ami:
        id: ami-0acdb852b0fbcc887
      apiVersion: awsproviderconfig.openshift.io/v1beta1
      blockDevices:
      - ebs:
          encrypted: true
          iops: 0
          kmsKey:
            arn: ""
          volumeSize: 120
          volumeType: gp3
      credentialsSecret:
        name: aws-cloud-credentials
      deviceIndex: 0
      iamInstanceProfile:
        id: zhsunaws15-sqrlq-worker-profile
      instanceType: m6i.xlarge
      kind: AWSMachineProviderConfig
      metadata:
        creationTimestamp: null
      placement:
        availabilityZone: us-east-2c
        region: us-east-2
      securityGroups:
      - filters:
        - name: tag:Name
          values:
          - zhsunaws15-sqrlq-worker-sg
      subnet:
        filters:
        - name: tag:Name
          values:
          - zhsunaws15-sqrlq-private-us-east-2c
      tags:
      - name: kubernetes.io/cluster/zhsunaws15-sqrlq
        value: owned
      userDataSecret:
        name: worker-user-data
2.  oc create -f worker.yaml
$ oc get machine                                                                                                                                                   [14:36:43]
NAME                                       PHASE     TYPE         REGION      ZONE         AGE
zhsunaws15-sqrlq-master-0                  Running   m6i.xlarge   us-east-2   us-east-2a   3h9m
zhsunaws15-sqrlq-master-1                  Running   m6i.xlarge   us-east-2   us-east-2b   3h9m
zhsunaws15-sqrlq-master-2                  Running   m6i.xlarge   us-east-2   us-east-2c   3h9m
zhsunaws15-sqrlq-worker-us-east-2a-ghvs2   Running   m6i.large    us-east-2   us-east-2a   3h6m
zhsunaws15-sqrlq-worker-us-east-2b-25r79   Running   m6i.large    us-east-2   us-east-2b   3h6m
zhsunaws15-sqrlq-worker-us-east-2c-7hf45   Running   m6i.large    us-east-2   us-east-2c   3h6m
zhsunaws15-sqrlq-worker-us-east-2c-test    Running   m6i.large    us-east-2   us-east-2c   15m
3. update worker.yaml
instanceType: m6i.2large
machine.openshift.io/instance-type: m6i.2large
4.  $ oc apply -f worker.yaml                                                                                                                                                      [14:36:49]
Warning: resource machines/zhsunaws15-sqrlq-worker-us-east-2c-test is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by oc apply. oc apply should only be used on resources created declaratively by either oc create --save-config or oc apply. The missing annotation will be patched automatically.
machine.machine.openshift.io/zhsunaws15-sqrlq-worker-us-east-2c-test configure
5. check machine instanceType is still m6i.large
$ oc get machine                                                                                                                                                                [14:48:54]
NAME                                       PHASE     TYPE         REGION      ZONE         AGE
zhsunaws15-sqrlq-master-0                  Running   m6i.xlarge   us-east-2   us-east-2a   3h21m
zhsunaws15-sqrlq-master-1                  Running   m6i.xlarge   us-east-2   us-east-2b   3h21m
zhsunaws15-sqrlq-master-2                  Running   m6i.xlarge   us-east-2   us-east-2c   3h21m
zhsunaws15-sqrlq-worker-us-east-2a-ghvs2   Running   m6i.large    us-east-2   us-east-2a   3h19m
zhsunaws15-sqrlq-worker-us-east-2b-25r79   Running   m6i.large    us-east-2   us-east-2b   3h19m
zhsunaws15-sqrlq-worker-us-east-2c-7hf45   Running   m6i.large    us-east-2   us-east-2c   3h19m
zhsunaws15-sqrlq-worker-us-east-2c-test    Running   m6i.large    us-east-2   us-east-2c   27m


master machine:
1. oc get machine zhsunaws15-sqrlq-master-0 -o yaml > master.yaml
2. update master.yaml based on the doc, change instanceType to m6i.2xlarge
master.yaml
apiVersion: machine.openshift.io/v1beta1
kind: Machine
metadata:
  labels:
    machine.openshift.io/cluster-api-cluster: zhsunaws15-sqrlq
    machine.openshift.io/cluster-api-machine-role: master
    machine.openshift.io/cluster-api-machine-type: master
    machine.openshift.io/instance-type: m6i.2xlarge
    machine.openshift.io/region: us-east-2
    machine.openshift.io/zone: us-east-2a
  name: zhsunaws15-sqrlq-master-0
  namespace: openshift-machine-api
spec:
  lifecycleHooks: {}
  providerSpec:
    value:
      ami:
        id: ami-0acdb852b0fbcc887
      apiVersion: awsproviderconfig.openshift.io/v1beta1
      blockDevices:
      - ebs:
          encrypted: true
          iops: 0
          kmsKey:
            arn: ""
          volumeSize: 120
          volumeType: gp3
      credentialsSecret:
        name: aws-cloud-credentials
      deviceIndex: 0
      iamInstanceProfile:
        id: zhsunaws15-sqrlq-master-profile
      instanceType: m6i.2xlarge
      kind: AWSMachineProviderConfig
      loadBalancers:
      - name: zhsunaws15-sqrlq-int
        type: network
      - name: zhsunaws15-sqrlq-ext
        type: network
      metadata:
        creationTimestamp: null
      placement:
        availabilityZone: us-east-2a
        region: us-east-2
      securityGroups:
      - filters:
        - name: tag:Name
          values:
          - zhsunaws15-sqrlq-master-sg
      subnet:
        filters:
        - name: tag:Name
          values:
          - zhsunaws15-sqrlq-private-us-east-2a
      tags:
      - name: kubernetes.io/cluster/zhsunaws15-sqrlq
        value: owned
      userDataSecret:
        name: master-user-data
2. $ oc apply -f master.yaml                                                                                                                                                       [14:45:34]
Warning: resource machines/zhsunaws15-sqrlq-master-0 is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by oc apply. oc apply should only be used on resources created declaratively by either oc create --save-config or oc apply. The missing annotation will be patched automatically.
machine.machine.openshift.io/zhsunaws15-sqrlq-master-0 configured
3. check instanceType
$ oc get machine                                                                                                                                                                [15:15:39]
NAME                                       PHASE     TYPE         REGION      ZONE         AGE
zhsunaws15-sqrlq-master-0                  Running   m6i.xlarge   us-east-2   us-east-2a   3h48m
zhsunaws15-sqrlq-master-1                  Running   m6i.xlarge   us-east-2   us-east-2b   3h48m
zhsunaws15-sqrlq-master-2                  Running   m6i.xlarge   us-east-2   us-east-2c   3h48m
zhsunaws15-sqrlq-worker-us-east-2a-ghvs2   Running   m6i.large    us-east-2   us-east-2a   3h45m
zhsunaws15-sqrlq-worker-us-east-2b-25r79   Running   m6i.large    us-east-2   us-east-2b   3h45m
zhsunaws15-sqrlq-worker-us-east-2c-7hf45   Running   m6i.large    us-east-2   us-east-2c   3h45m
zhsunaws15-sqrlq-worker-us-east-2c-test    Running   m6i.large    us-east-2   us-east-2c   54m

Comment 10 sunzhaohua 2022-04-25 10:36:50 UTC
@Servesha sorry, I followed the steps in https://access.redhat.com/solutions/6409091 and tested again.
After completing the below changes on the AWS end, master instance type could be changed. But I am not sure if we can add these steps to our doc. We don't have any features say we support such operations.

Access the AWS console and go to the EC2 dashboard and select the instance for the same machine for which changes were made.
Stop the selected instance.
Change the instance type to the desired one i.e the same we made changes in the file as "".
Start the instance again from EC2 console.


Note You need to log in before you can comment on or make changes to this bug.