Updating an OKE Node Pool
On Compute Cloud@Customer, you can update any configuration that you can set when you create a node pool except for the compartment where nodes are created.
When you update node properties, by default existing nodes aren't updated. The updated values only apply to new nodes that are created. New nodes are created when you increase the node count, change the fault domain, or change the subnet.
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.
To replace existing nodes with new nodes that use these updated settings, see Node Cycling an OKE Node Pool.
If you make changes that add new worker nodes, perform the following steps:
-
Configure any registries or repositories that the worker nodes need. Ensure you have access to a self-managed public or intranet container registry to use with the OKE service and your application images.
-
Create a service to expose containerized applications outside the Compute Cloud@Customer. See Exposing Containerized Applications.
-
Create persistent storage for applications to use. See Adding Storage for Containerized Applications.
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.
- In the Compute Cloud@Customer Console navigation menu, click Containers, then click Kubernetes Clusters.
-
Click the name of the cluster that contains the node pool that you want to update.
-
On the cluster details page, under Resources, click Node Pools.
-
For the node pool that you want to update in the Node Pools list, click the Actions menu (), then click Edit.
The Edit Node Pool dialog box opens. You can change any configuration except the compartment where new nodes are created.
In the 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.
You can't clear Force terminate after grace period. For descriptions of cordon and drain and eviction grace duration, go to Creating an OKE Worker Node Pool, click the CLI tab, and see Node and node pool deletion settings.
Note
Don't 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.
-
When you're 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.
The updated configuration only applies to new nodes that are created by this procedure or in the future.
To replace existing nodes with new nodes that use these updated settings, see Node Cycling an OKE Node Pool.
What's Next:
If you make changes that add new worker nodes, consider your next steps:
-
Configure any registries or repositories that the worker nodes need. Ensure you have access to a self-managed public or intranet container registry to use with the OKE service and your application images.
-
Create a service to expose containerized applications outside the Compute Cloud@Customer. See Exposing Containerized Applications.
-
Create persistent storage for applications to use. See Adding Storage for Containerized Applications.
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.
Use the oci ce node-pool update command and required parameters to update a node pool.
oci ce node-pool update --node-pool-id <node-pool_OCID> [OPTIONS]
-
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 usingkubectl
. 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.
-
-
(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 thisnode-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. -
Run the update node pool command.
$ oci ce node-pool update --node-pool-id ocid1.nodepool.unique_ID \ <new_configuration_settings>
What's Next:
If you make changes that add new worker nodes, consider your next steps:
-
Configure any registries or repositories that the worker nodes need. Ensure you have access to a self-managed public or intranet container registry to use with the OKE service and your application images.
-
Create a service to expose containerized applications outside the Compute Cloud@Customer. See Exposing Containerized Applications.
-
Create persistent storage for applications to use. See Adding Storage for Containerized Applications.
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.
For a complete list of CLI commands, flags, and options, see the Command Line Reference.
-
Use the UpdateNodePool operation to update a node pool.
If you make changes that add new worker nodes, consider your next steps:
-
Configure any registries or repositories that the worker nodes need. Ensure you have access to a self-managed public or intranet container registry to use with the OKE service and your application images.
-
Create a service to expose containerized applications outside the Compute Cloud@Customer. See Exposing Containerized Applications.
-
Create persistent storage for applications to use. See Adding Storage for Containerized Applications.
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.
For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.
-