Updating an OKE Node Pool

When you update a node pool, existing nodes are not updated. The updated configuration only applies to new nodes that are created.

To change the properties of existing nodes, you could instead create a new node pool with the new settings and move the work to the new nodes.

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.

The updated configuration only applies to new nodes that are created. New nodes are created when you increase the node count, change the fault domain, or change the subnet.

Important:

If you change the fault domain or subnet of a node pool, existing worker nodes are terminated and new worker nodes are created using the updated configuration.

If you make changes that add new worker nodes, see Node Pool Next Steps.

To add defined or free-form tags to all nodes in the node pool, use the OCI CLI.

Using the Compute Web UI

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

  2. Click 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 click Node Pools.

  4. For the node pool that you want to update in the Node Pools list, click the Actions menu and click 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.

    Note:

    Do not specify values for the OraclePCA-OKE 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, click 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.

Using the OCI CLI

  1. Get the OCID of the node pool that you want to update: oci ce node-pool list

  2. (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 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, change, or delete defined or free-form tags for all nodes in the node pool, use the --node-defined-tags and --node-freeform-tags options.

    Important:

    The argument you specify for the --node-defined-tags or --node-freeform-tags option replaces any existing tag definitions. Ensure that you copy and include the OraclePCA-OKE defined tag information in any --node-defined-tags argument, and copy and include the ClusterResourceIdentifier free-form tag information in any --node-freeform-tags argument. These tag values are system-generated and must not be changed or deleted.

  3. Run the update node pool command.

    Syntax:

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

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