Tags: AWS


When Kublr creates an AWS cluster it will create AWS AutoScaling Groups for each node group (and for each individual instance in stateful node groups). You can read more about AWS Kubernetes cluster architecture created by Kublr in Kublr reference documentation.


By default the AutoScaling Groups are created with default AWS update policy, which means that the instances will not be automatically recreated when you update Kublr cluster changing AutoScaling Group or Launch Template properties such as AMI ID, instance type etc.


If you need AWS to automatically replace EC2 instances in Kublr Kubernetes cluster when instance parameters are changed, make sure to include a requisite UpdatePolicy for corresponding node groups in the Kublr cluster specification.


The following Kublr cluster specification snippet shows how AutoScaling Group Update Policy can be included in the cluster specification for both the master and the worker node groups:


spec:
  master:
    ...
    locations:
      - ...
        aws:
          asgCloudFormationExtras:
            UpdatePolicy:
              AutoScalingReplacingUpdate:
                WillReplace: true
  ...
  nodes:
    - ...
      locations:
        - ...
          aws:
            asgCloudFormationExtras:
              UpdatePolicy:
                AutoScalingRollingUpdate:
                  MaxBatchSize: 2
                  MinInstancesInService: 5
                  PauseTime: PT1M


The example above configures the master node group for immediate replacement, while the worker nodes will replaced using rolling update strategy with max batch size 2, minimum required number of instances in service 5, and pause time after each batch update 1 minute.


See the following additional documentation for additional information: