Skip to main content

What is allocatable in vCluster virtual scheduler

Supported Configurations
Running the control plane as a container with:

What are allocatable resources on a node?

Allocatable on a Kubernetes node represents the compute resources available for pods. The scheduler prevents over-subscribing resources beyond the allocatable value. It supports three primary resource types:

  • CPU
  • Memory
  • Ephemeral storage

What is vCluster virtual scheduler?

By default, vCluster uses the control plane cluster scheduler to determine pod placement. This approach offers two key benefits:

  • Saves computing resources.
  • Allows pods to run on any node.

However, the control plane cluster scheduler has limitations detailed in the virtual scheduler documentation. The virtual scheduler provides an alternative by:

  • Making independent pod allocation decisions.
  • Allowing taints and labels on tenant cluster nodes.
  • Preventing modifications to the control plane cluster nodes.

The challenge with allocatable values

When using the vCluster virtual scheduler, you'll notice a significant difference between node allocatable values in the control plane cluster and vCluster context.

Consider this scenario:

  • Kubernetes cluster with three nodes
  • vCluster assigned to use only two nodes
  • Focus on CPU allocation for simplicity

Control plane cluster perspective

In the control plane Kubernetes cluster context, the first node shows 62.5 allocatable cpus. This value is calculated by:

  • Total node cpus: 64
  • Minus kubeReserved and systemReserved values

vCluster perspective

In the vCluster context, the same node shows an allocatable value of 30.5 or lower.

Why the allocatable values differ

The vCluster scheduler uses the allocatable value to prevent over-subscribing resources.

  • Must reflect resources available specifically to vCluster
  • Cannot use the entire control plane cluster's allocatable value
  • Node details show only what vCluster knows and controls

Using the full allocatable value of the control plane cluster would cause the vCluster scheduler to over-subscribe the node.

How vCluster manages allocatable values

The vCluster syncer implements a dynamic update mechanism:

  • Regularly reads node information from the control plane cluster.
  • Updates node information in the vCluster.
  • Ensures allocatable values change as pods start and stop in the control plane cluster context.