Updating an OKE Node Pool

You can update any configuration that you can set when you create a node pool except for the compartment where nodes will be created. See Creating an OKE Worker Node Pool for property descriptions.

When you update node properties, by default existing nodes are not updated. The updated values only apply to new nodes that are created. New nodes are created when you increase the node count. If new worker nodes are created, see Node Pool Next Steps.

To replace existing nodes with new nodes that use these updated settings, see Node Cycling an OKE Node Pool.

Using the Compute Web UI

  1. On the dashboard, select Containers / View Kubernetes Clusters (OKE).

  2. Select the name of the cluster that contains the node pool that you want to update.

  3. On the cluster details page, scroll to the Resources section, and select Node Pools.

  4. For the node pool that you want to update in the Node Pools list, select the Actions menu and select Edit.

    The Edit Node Pool dialog opens. You can change any configuration except the compartment where new nodes will be created. See Creating an OKE Worker Node Pool for property descriptions. The updated configuration only applies to new nodes that are created, as described at the beginning of this topic.

    Cordon and Drain settings

    Enter the number of minutes of eviction grace duration, or use the arrows to decrease or increase the number of minutes of eviction grace duration. The maximum value and default value is 60 minutes.

    • Private Cloud Appliance Release 3.0.2-b1261765. You can specify an integer from 0 to 60. If you enter 0, the value will be converted to 0.333 because 20 seconds is the minimum eviction grace duration. The field will show a decimal value if the existing value was set in ISO 8601 format and included a seconds value. For example, an existing value of PT45S will show as 0.45, PT20M will show as 20, and PT39M21S will show as 39.35.

    • Private Cloud Appliance Release 3.0.2-b1185392. Specify an integer from 1 to 60. If the existing value was set in ISO 8601 format and includes a seconds value, that value will display as the next higher integer number of minutes. The seconds value will still be used, even though it does not display.

    You cannot deselect "Force terminate after grace period." For descriptions of cordon and drain and eviction grace duration, see Node and node pool deletion settings in "Using the OCI CLI" in Creating an OKE Worker Node Pool.

    Note:

    Do not specify values for the OraclePCA-OKE.cluster_id defined tag or for the ClusterResourceIdentifier free-form tag. These tag values are system-generated and only applied to nodes (instances), not to the node pool resource.

  5. When you are finished making changes, select Save Changes.

    The details page for the node pool is displayed. In addition to Node Pool Information and Tags tabs, the node pool details page has a Placement Configuration tab.

    The updated configuration only applies to new nodes that are created by this procedure or in the future, as described at the beginning of this topic.

    To replace existing nodes with new nodes that use these updated settings, see Node Cycling an OKE Node Pool.

Using the OCI CLI

  1. Get the information you need to run the command.

    • The OCID of the node pool that you want to update: oci ce node-pool list

    • (Optional) Node and node pool deletion settings. Use the --node-eviction-node-pool-settings option or the --override-eviction-grace-duration option to set the eviction grace duration for nodes. Nodes are always deleted after their pods are evicted or at the end of the eviction grace duration. See the description in Creating an OKE Worker Node Pool.

    • (Optional) Labels. To add labels to new nodes, use the --initial-node-labels option. Labels on existing nodes cannot be changed by using the --initial-node-labels option. Labels on existing nodes can be modified using kubectl. For more information about node labels, see Creating an OKE Worker Node Pool.

    • (Optional) Tags. Add, change, or delete defined or free-form tags for the node pool resource by using the --defined-tags and --freeform-tags options. Do not specify values for the OraclePCA-OKE.cluster_id defined tag or for the ClusterResourceIdentifier free-form tag. These tag values are system-generated and only applied to nodes (instances), not to the node pool resource.

      To add tags to nodes that are newly added to the node pool, use the --node-defined-tags and --node-freeform-tags options.

  2. (Optional) Create an argument for the --node-pool-cycling-details option, and use that option to apply these updates to all of the nodes in the node pool.

    Without the --node-pool-cycling-details option, the updated configuration specified in this node-pool update command only applies to new nodes that are created by this command or in the future, as described at the beginning of this topic.

    To replace existing nodes with new nodes that use these updated settings, specify the --node-pool-cycling-details option as described in Node Cycling an OKE Node Pool.

  3. Run the update node pool command.

    Syntax:

    $ oci ce node-pool update --node-pool-id ocid1.nodepool.unique_ID \
    new_configuration_settings