Plan in advance to ensure worker node capacity is available for critical workloads

Oracle Container Engine for Kubernetes (OKE) Supports Capacity Reservations

Mickey Boxell
Oracle Developers
Published in
4 min readMar 10, 2022

--

Reserved Oracle Cloud Infrastructure (OCI) Compute capacity can now be used to create Oracle Container Engine for Kubernetes (OKE) worker nodes. Reserving capacity provides users with the confidence that Compute resources will be available when they are most needed, such as recovering from a disaster or an unexpected workload spike.

What Are Capacity Reservations?

Capacity Reservations enable users to reserve virtual machine and bare metal Compute instance capacity in advance to ensure resources are available for a tenancy to consume when needed. Users without reserved capacity may find themselves in a situation where a specific fault domain or availability domain within a region no longer has available capacity for a given Compute shape. In such a case, users would need to wait until capacity is returned to the pool to be able to provision additional Compute instances to support their workloads. There are many times when waiting is simply not an option: for example, to ensure capacity is available when failing over to a secondary location or providing buffer capacity for unexpected workload spikes.

By adding support for capacity reservations to OKE, users with containerized workloads can now experience peace of mind that capacity will be available during critical events.

Capacity reservations also play a useful role in cost-optimization. Because capacity reservations cost less than running instances, using them to maintain backup or buffer capacity for the use cases mentioned above is more cost-effective than the use of always on hot-spares or extra worker nodes. Capacity reservations can be modified, deleted, or created at any time to match the shifting needs of the business. There is no minimum time commitment.

Using Capacity Reservations

Users may choose to use an existing capacity reservation or create a new capacity reservation in the Compute service. After having done so, users pass the matching capacity reservation ID into an OKE node pool as a parameter in the placement configuration, which is also used to control the placement of nodes in availability domains and OCI virtual cloud network subnets. It is important to make sure that the node shape and availability domain in the node pool’s placement configuration match the capacity reservation’s instance type and availability domain respectively in order to ensure instances launch as expected. After specifying a capacity reservation, nodes added to the node pool will be created using Compute instances from the associated reservation. This will continue as long as sufficient capacity is available.

To create a node pool with a capacity reservation, I included the capacity reservation ID in the placement configuration of the node pool:

oci ce node-pool create \
--cluster-id ocid1.cluster.oc1.iad.aaaaaaaaaf______jrd \
--name capacity-reservation-example \
--node-image-id ocid1.image.oc1.iad.aaaaaaaa6______nha \
--compartment-id ocid1.compartment.oc1..aaaaaaaay______t6q \
--kubernetes-version v1.21.5 \
--node-shape VM.Standard2.1 \
--placement-configs "[{\"availabilityDomain\":
\"IqDk:US-ASHBURN-AD-1\", \"capacityReservationId\":
\"ocid1.capacityreservation.oc1.iad.anuwcljt2ah______yeq\", \"subnetId\":
\"ocid1.subnet.oc1.iad.aaaaaaaa2xpk______zva\"}]" \
--size 1 \
--region=us-ashburn-1

Default Reservations

Container Engine for Kubernetes also supports the use of default capacity reservations when launching worker nodes. Default reservations are capacity reservations that apply to all instances created in the tenancy and availability domain associated with the reservation. Having created a default capacity reservation, all Compute instances, including Kubernetes worker nodes, launched in that availability domain and tenancy will use capacity from the default capacity reservation.

There may be occasions when users do not want to provision worker nodes from a default capacity reservation. In those cases, users can specify an alternative capacity reservation in the placement configurations parameter of their node pool, or choose to opt out of the default reservation and launch on nodes using on-demand Compute capacity.

Conclusion

The ability to provision worker nodes from reserved capacity ensures Compute users and users with containerized workloads running on Kubernetes will have enough resources at their disposal when they are needed most. There is no longer a need to wait for on-demand capacity to be released by other users or over provision hot standby worker node hosts to guarantee the availability of capacity. Now users have a cost-effective way to ensure the continuity of their containerized environments and the business they support.

Use the following resources to learn more:

Join the conversation!

If you’re curious about the goings-on of Oracle Developers in their natural habitat, come join us on our public Slack channel! We don’t mind being your fish bowl 🐠

--

--

Mickey Boxell
Oracle Developers

Product Manager — OCI Container Engine for Kubernetes (OKE)