Home Explore Blog CI



kubernetes

1st chunk of `content/en/docs/tasks/administer-cluster/node-overprovisioning.md`
5650408406281b8c0e48bfd21fc667b0b6ac91d9d16ba8ec0000000100000ae9
---
title: Overprovision Node Capacity For A Cluster
content_type: task
weight: 10
---


<!-- overview -->

This page guides you through configuring {{< glossary_tooltip text="Node" term_id="node" >}}
overprovisioning in your Kubernetes cluster. Node overprovisioning is a strategy that proactively
reserves a portion of your cluster's compute resources. This reservation helps reduce the time
required to schedule new pods during scaling events, enhancing your cluster's responsiveness
to sudden spikes in traffic or workload demands.

By maintaining some unused capacity, you ensure that resources are immediately available when
new pods are created, preventing them from entering a pending state while the cluster scales up.

## {{% heading "prerequisites" %}}

- You need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with
  your cluster.
- You should already have a basic understanding of
  [Deployments](/docs/concepts/workloads/controllers/deployment/),
  Pod {{< glossary_tooltip text="priority" term_id="pod-priority" >}},
  and {{< glossary_tooltip text="PriorityClasses" term_id="priority-class" >}}.
- Your cluster must be set up with an [autoscaler](/docs/concepts/cluster-administration/cluster-autoscaling/)
  that manages nodes based on demand.

<!-- steps -->

## Create a PriorityClass

Begin by defining a PriorityClass for the placeholder Pods. First, create a PriorityClass with a
negative priority value, that you will shortly assign to the placeholder pods.
Later, you will set up a Deployment that uses this PriorityClass

{{% code_sample language="yaml" file="priorityclass/low-priority-class.yaml" %}}

Then create the PriorityClass:

```shell
kubectl apply -f https://k8s.io/examples/priorityclass/low-priority-class.yaml
```

You will next define a Deployment that uses the negative-priority PriorityClass and runs a minimal container.
When you add this to your cluster, Kubernetes runs those placeholder pods to reserve capacity. Any time there
is a capacity shortage, the control plane will pick one these placeholder pods as the first candidate to
{{< glossary_tooltip text="preempt" term_id="preemption" >}}.

## Run Pods that request node capacity

Review the sample manifest:

{{% code_sample language="yaml" file="deployments/deployment-with-capacity-reservation.yaml" %}}

### Pick a namespace for the placeholder pods

You should select, or create, a {{< glossary_tooltip term_id="namespace" text="namespace">}}
that the placeholder Pods will go into.

### Create the placeholder deployment

Create a Deployment based on that manifest:

```shell
# Change the namespace name "example"
kubectl --namespace example apply -f https://k8s.io/examples/deployments/deployment-with-capacity-reservation.yaml
```


Title: Overprovisioning Node Capacity in Kubernetes
Summary
This guide explains how to configure node overprovisioning in a Kubernetes cluster to reduce pod scheduling time during scaling events. It involves creating a PriorityClass with negative priority and deploying placeholder pods that reserve capacity. These pods are preempted when actual workloads require resources, ensuring faster scaling and responsiveness.