From add321d65fba0d06c5971dc62adb784d85a94903 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Mon, 12 Oct 2026 09:47:59 -0400 Subject: [PATCH 1/2] hack: KIND_RESERVED_CPU reserves kubelet and system CPU on kind nodes Dense nodes starve the kubelet's heartbeat; after the 300 s toleration the taint manager evicts the node's pods. Opt-in; unset leaves the config as is. --- hack/create-kind-cluster.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hack/create-kind-cluster.sh b/hack/create-kind-cluster.sh index 9d5a0e42e5..e5f1d12c62 100755 --- a/hack/create-kind-cluster.sh +++ b/hack/create-kind-cluster.sh @@ -124,6 +124,17 @@ kubeadmConfigPatches: serializeImagePulls: false maxParallelImagePulls: 4 EOF +# Hundreds of sandboxes per node can starve the kubelet's node heartbeat; after +# the 300 s toleration the taint manager evicts every pod on the node. Opt in to +# a CPU reservation for the kubelet and the system, e.g. KIND_RESERVED_CPU=2. +if [[ -n "${KIND_RESERVED_CPU:-}" ]]; then +cat <> "${ROOT}/bin/kind-config.yaml" + systemReserved: + cpu: "${KIND_RESERVED_CPU}" + kubeReserved: + cpu: "${KIND_RESERVED_CPU}" +EOF +fi echo "Deleting existing kind cluster '${KIND_CLUSTER_NAME}' if it exists..." "${ROOT}"/hack/kind.sh delete cluster --name "${KIND_CLUSTER_NAME}" || true From 4af363cca57d14d3979253a956ccd031f99a84ea Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Thu, 15 Oct 2026 06:50:05 -0400 Subject: [PATCH 2/2] hack: rename the kubelet reservation knob to ATE_KIND_RESERVED_CPU KIND_ is the environment namespace kind itself reads. The knob is now listed in --help as well. --- hack/create-kind-cluster.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/hack/create-kind-cluster.sh b/hack/create-kind-cluster.sh index e5f1d12c62..e908917121 100755 --- a/hack/create-kind-cluster.sh +++ b/hack/create-kind-cluster.sh @@ -29,8 +29,9 @@ if [[ $# -gt 0 ]]; then echo "Creates the kind cluster '${KIND_CLUSTER_NAME}' and a local registry container on port ${reg_port}." echo echo "Configured through the environment:" - echo " KIND_CLUSTER_NAME Name of the cluster to create (default: kind)." - echo " IP_FAMILY Address families for pods and Services: ipv4, ipv6 or dual (default: ipv4)." + echo " KIND_CLUSTER_NAME Name of the cluster to create (default: kind)." + echo " IP_FAMILY Address families for pods and Services: ipv4, ipv6 or dual (default: ipv4)." + echo " ATE_KIND_RESERVED_CPU CPU reserved for the kubelet and the system on each node (default: none)." exit 0 ;; esac @@ -126,13 +127,13 @@ kubeadmConfigPatches: EOF # Hundreds of sandboxes per node can starve the kubelet's node heartbeat; after # the 300 s toleration the taint manager evicts every pod on the node. Opt in to -# a CPU reservation for the kubelet and the system, e.g. KIND_RESERVED_CPU=2. -if [[ -n "${KIND_RESERVED_CPU:-}" ]]; then +# a CPU reservation for the kubelet and the system, e.g. ATE_KIND_RESERVED_CPU=2. +if [[ -n "${ATE_KIND_RESERVED_CPU:-}" ]]; then cat <> "${ROOT}/bin/kind-config.yaml" systemReserved: - cpu: "${KIND_RESERVED_CPU}" + cpu: "${ATE_KIND_RESERVED_CPU}" kubeReserved: - cpu: "${KIND_RESERVED_CPU}" + cpu: "${ATE_KIND_RESERVED_CPU}" EOF fi