Node Cycling an OKE Node Pool
By default when you update a node pool, only new nodes that are added during this update or that are added later receive the updates. To replace existing nodes with new nodes that use updated settings, enable the node cycling option.
Node cycling performs an in-place update of all existing nodes in the node pool to the latest specified configuration. New nodes are created, workloads moved onto them from existing nodes, current node pool updates applied, and the original nodes terminated.
You can set the maximum number of nodes that are starting or terminating at any particular time.
-
Maximum surge. The maximum number of new nodes that can be starting at any time during this update operation. Set this value to avoid adding too many new nodes before existing nodes are terminated, which could incur excessive cost. The default value is 1. The maximum value is 5.
-
Maximum unavailable. The maximum number of existing nodes that can be terminating at any time during this update operation. Set this value to ensure that enough nodes remain to handle the workload. The default value is 0. The maximum value is 7.
One of these values must be greater than 0.
Both of these values can be set to either a number (from 0 to the configured number of nodes in the node pool, but not greater than the maximum cited above) or a percentage (from 0% to 100%, but not a percentage that would result in a number greater than the maximum cited above). These values can be a maximum of four characters.
Both of these values must be a number of nodes, or both of these values must be a percentage. You cannot specify one of these values as a number of nodes and the other value as a percentage.
If you set either of these properties to a percent value that exceeds the maximum allowed number of nodes, the error message tells you the maximum allowed percent value for this node pool.
Note:
If the node cycling operation fails (for example, the operation times out), try re-running the operation. You might need to run the node cycling operation multiple times if the system is loaded and running at scale.
Using the Compute Web UI
Follow the Compute Web UI procedure in Updating an OKE Node Pool to update the node pool configuration.
-
On the node pool details page, click the Cycle Nodes button.
-
In the Cycle Nodes dialog, enter values for the Maximum Surge and Maximum Unavailable properties.
See the rules at the beginning of this topic.
-
Click the Cycle Nodes button in the dialog to start the node pool update operation.
To monitor the progress of the update operation, view the status of the associated work request.
Using the OCI CLI
-
Construct a command to update the node pool configuration as described in the Compute Web UI procedure in Updating an OKE Node Pool.
-
In that same command (not later as with the Compute Web UI procedure) include the
--node-pool-cycling-details
option.In addition to setting
maximumUnavailable
andmaximumSurge
, enable node cycling by settingisNodeCyclingEnabled
totrue
. By default,isNodeCyclingEnabled
isfalse
, and node cycling will not be performed if you set onlymaximumUnavailable
ormaximumSurge
and do not setisNodeCyclingEnabled
totrue
.$ oci ce node-pool update --node-pool-id ocid1.nodepool.unique_ID \ new_configuration_settings \ --node-pool-cycling-details '{"isNodeCyclingEnabled":true,"maximumUnavailable":"value","maximumSurge":"value"}'
See the beginning of this topic for the possible values.
In the following example, the image is updated for all nodes in the node pool:
$ oci ce node-pool update --node-pool-id ocid1.nodepool.unique_ID \ --node-source-details '{"imageId":"ocid1.image.unique_ID","sourceType":"IMAGE"}' \ --node-pool-cycling-details '{"isNodeCyclingEnabled":true,"maximumUnavailable":"5%","maximumSurge":"5%"}'
To monitor the progress of the update operation, view the status of the associated work request.
Find the work request OCID:
oci ce work-request list --compartment-id ocid1.compartment.unique_ID \ --resource-id ocid1.nodepool.unique_ID
Show the current state of the work request:
oci ce work-request get --work-request-id ocid1.workrequest.unique_ID