Deleting an OKE Node Pool Node

These procedures describe how to explicitly delete a worker node. Worker nodes are also deleted when you update a node pool to scale down the node pool or change the subnet or fault domains of the node pool. See Updating an OKE Node Pool.

Deleting a worker node permanently deletes the node. You cannot recover a deleted worker node.

When you delete a node, by default a new node is created to satisfy the node count set for the pool. To override this behavior, select the option to decrease node pool size.

Do not use the kubectl delete node command to terminate worker nodes in an OKE cluster. The kubectl delete node command removes the worker node from the cluster's etcd key-value store, but the command does not terminate the underlying compute instance.

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 that you want to delete.

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

  4. Click the name of the node pool that contains the node that you want to delete.

  5. On the node pool details page, scroll to the Resources section, and click Nodes.

  6. For the node that you want to delete, click the Actions menu, and click Delete.

  7. Confirm the deletion.

    1. If you do not want a new node to be automatically created to replace the deleted node, click Decrease node pool size.

    2. Click the Delete button on the dialog.

Using the OCI CLI

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

    • OCID of the node pool: oci ce node-pool list

    • OCID of the node: oci ce node-pool list

  2. Run the delete node pool node command.

    If you do not want a new node to be automatically created to replace the deleted node, specify the --is-decrement-size option.

    Example:

    $ oci ce node-pool delete-node --node-pool-id ocid1.nodepool.unique_ID \
    --node-id ocid1.instance.unique_ID --is-decrement-size true --force