Scaling Node Pools

Find out how to scale up and scale down the node pools you've created using Container Engine for Kubernetes (OKE).

To optimize resource usage, you can scale a node pool up and down to change the number of worker nodes in the node pool, and the availability domains and subnets in which to place them.

For general information about modifying node pools and worker nodes, see Modifying Node Pool and Worker Node Properties. In particular, note the following:

  • Any changes you make to worker node properties will only apply to new worker nodes. You cannot change the properties of existing worker nodes.
  • If you change a node pool's placement configuration (the availability domains, fault domains, and subnets in which worker nodes are placed, but not the node pool's capacity type), existing worker nodes are terminated and new worker nodes are created in the new locations.
  • If a capacity reservation is specified for a node pool, note that the node shape, availability domain, and fault domain in the node pool's placement configuration must always match the capacity reservation's instance type, availability domain, and fault domain respectively. See Using Capacity Reservations to Provision Managed Nodes.
  • Do not use the kubectl delete node command to scale down or terminate worker nodes in a cluster that was created by Container Engine for Kubernetes. Instead, reduce the number of worker nodes by changing the corresponding node pool properties using the Console or the API. The kubectl delete node command does not change a node pool's properties, which determine the desired state (including the number of worker nodes). Also, although the kubectl delete node command removes the worker node from the cluster's etcd key-value store, the command does not delete the underlying instance or virtual node.
  • When scaling down a node pool, note that the node pool's Cordon and drain properties determine when and how worker nodes are terminated. See Notes on cordoning and draining managed nodes before termination.

Using the Console

To scale up or scale down an existing node pool by increasing or decreasing the number of worker nodes:

  1. In the Console, open the navigation menu and click Developer Services. Under Containers & Artifacts, click Kubernetes Clusters (OKE).
  2. Choose a Compartment you have permission to work in.
  3. On the Cluster List page, click the name of the cluster you want to modify.
  4. Click Node Pools under Resources, and click the name of the node pool you want to scale.
  5. On the Node Pool Details page, click Edit and specify:

    • the number of worker nodes you want in the node pool after the scale operation is complete
    • the network security groups with security rules to control traffic into and out of the node pool
    • the availability domains and fault domains in which to place the worker nodes
    • the regional subnets (recommended) or AD-specific subnets to host the worker nodes
    • a capacity type to use
  6. Save the changes.

If you subsequently decide to scale down a node pool that you have scaled up, always use the Console, or the API. Do not use the kubectl delete node command (see Scaling Node Pools).