KiteGitHub
Quickstart

Node pool reference

Fields of the kiteplane.dev/v1alpha1 NodeClass, NodePool, and NodeClaim resources.

NodeClass, NodePool, and NodeClaim are cluster-scoped resources in kiteplane.dev/v1alpha1. Node pools explains how they work together.

NodeClass

A NodeClass describes one provider account and the machine types that a pool may request. Set exactly one of spec.gcp, spec.digitalocean or spec.aws.

FieldRequiredMeaning
spec.machineTypesYesMachine types, in order of preference.
spec.imageNoProvider image. Defaults to Ubuntu 24.04: see each provider below.
spec.diskGiBNoBoot-disk size in GiB. GCP and AWS.
spec.runtimesNoSandboxed runtimes each machine installs beside runc: gvisor, kata, or both. See Run a pod in a sandboxed runtime.

GCP

FieldRequiredMeaning
spec.gcp.projectYesProject that owns the instances.
spec.gcp.zonesYesZones, in order of preference.
spec.gcp.workloadIdentityProviderNoThe full resource name of a workload identity pool provider. With it, Kite stores no key.
spec.gcp.credentialsSecretRefNoSecret with a service-account key under key.json, for use without federation.
spec.gcp.serviceAccountYes, to create machinesService account assigned to created instances.
spec.gcp.networkNoVPC network.
spec.gcp.subnetworkNoSubnetwork.
spec.gcp.diskTypeNoBoot-disk type name, such as pd-balanced. Not a path or URL.
spec.gcp.localSsdCountNoNVMe Local SSDs for runtime and pod data, 0 to 32. Defaults to 0.
spec.gcp.spotNotrue creates Spot instances. Defaults to false.
spec.gcp.nicTypeNoGVNIC or VIRTIO_NET. C3D machine types need GVNIC.
spec.gcp.endpointsNoReplaces the Google API base URLs.
spec.gcp.identityIssuerNoReplaces the issuer that Kite expects on an instance identity document.

Without spec.image, Kite uses Canonical’s minimal Ubuntu 24.04, projects/ubuntu-os-cloud/global/images/family/ubuntu-minimal-2404-lts-amd64. A class that lists an Arm machine type needs an Arm spec.image.

For a machine type with bundled Local SSDs, set localSsdCount to the bundled count. Data on Local SSD is lost when the machine is deleted. When the provider stops a Spot instance, it deletes the instance.

AWS

FieldRequiredMeaning
spec.aws.regionYesRegion, such as us-east-1.
spec.aws.zonesYesAvailability zones, in order of preference.
spec.aws.roleArnYesThe IAM role that the control plane assumes with a token that it signs. Kite stores no access key.
spec.aws.instanceProfileYesInstance profile for created instances. Its role must have the same name.
spec.aws.subnetsNoSubnets to launch into. Defaults to each zone’s default subnet.
spec.aws.securityGroupsNoSecurity groups. Defaults to the VPC’s default group.
spec.aws.spotNotrue creates one-time Spot instances. Defaults to false.
spec.aws.orderNoListed or SpotPrice, the order in which a pool tries offerings. Defaults to Listed. See Spot price order.
spec.aws.endpointsNoReplaces the STS, EC2 and Systems Manager base URLs.

spec.image is an AMI ID or resolve:ssm:<parameter>. Without it, Kite uses the Systems Manager parameter for Canonical’s minimal Ubuntu 24.04 on the machine type’s architecture, /aws/service/canonical/ubuntu/server-minimal/24.04/stable/current/<arch>/hvm/ebs-gp3/ami-id.

spec.diskGiB sets the size of the root volume, which is a gp3 volume. On a machine type with an NVMe SSD instance store, the machine keeps runtime and pod data on that store instead of the root volume.

DigitalOcean

FieldRequiredMeaning
spec.digitalocean.credentialsSecretRefYesSecret with the DigitalOcean token under token.
spec.digitalocean.regionsYesRegions, in order of preference.
spec.digitalocean.vpcNoVPC UUID. Defaults to the region’s default VPC.
spec.digitalocean.endpointNoReplaces the DigitalOcean API base URL.

Without spec.image, Kite uses ubuntu-24-04-x64.

NodeClass status

FieldMeaning
status.machineTypesThe CPUs, memory and architecture of each machine type. A pool cannot use a machine type until the type appears in this list.
status.machineTypes[].localSsdBytesOn AWS, the size of the type’s NVMe SSD instance store.
status.machineTypes[].observedOnce a node of the type has joined: the CPUs, memory and storage that the node reported, with the image and storage layout it booted with.
status.machineTypesVersionFor the node pool controller’s own use. Do not set it.
status.spotPricesOn AWS, each offering’s machineType, location and price in dollars an hour. See Spot price order.
status.spotPricesReadAtThe time of the last price read.
status.credentialsVerifiedAtThe time the class’s credential was last checked.
status.conditionsSpotPricesRead is False while a price read fails, with the account’s error in its message. CredentialsVerified is below.

While a pool uses the class, the controller checks its credential once an hour: it reads the credential, exchanges it, and reads the first machine type, as kite nodepool verify does. kite nodepool verify records its own result as well, so after you fix a credential, running it clears the failure at once. The CredentialsVerified condition is True with reason Verified, or False with the step that failed, CredentialFailed, ExchangeFailed, ComputeFailed or PricesFailed, and the account’s error in its message. A class whose credential fails is listed in the cluster summary.

A pool plans a new machine of a type against observed while the class’s image matches it, and until then against the listed size less 7.5% of its memory.

Credentials and endpoints

  • credentialsSecretRef.namespace defaults to kube-system. Anyone who writes the class needs get on that Secret.
  • Credential errors do not appear on the class. To check the credentials, run kite nodepool verify <nodeclass> (CLI reference).
  • Without spec.gcp.serviceAccount, a GCP claim reports Launched=Unknown with reason CreateFailed.
  • The control plane refuses an endpoint or issuer override whose origin is not listed in KITE_PROVIDER_ENDPOINTS.
  • The control plane ignores a service-account key’s own token_uri. It exchanges the key at Google’s token endpoint, or at spec.gcp.endpoints.oauth when the deployment allows that origin.

Spot price order

An offering is a machine type in a zone. By default, a pool tries each type in spec.machineTypes in each zone in turn, and moves to the next type only when every zone has refused the type. With spec.aws.order: SpotPrice and spec.aws.spot: true:

  • A pool tries the offerings from the cheapest Spot price. Equal prices keep the listed order, and an offering with no price comes after every priced one.
  • The node pool controller reads each listed type’s price in each zone with ec2:DescribeSpotPriceHistory, at most once an hour, into status.spotPrices.
  • A pool uses the listed order when no prices have been read, or when the last read is more than six hours old.

To check that the class’s role can read prices, run kite nodepool verify <nodeclass>.

NodePool

A NodePool refers to a class. It sets the limits, labels and taints of the pool’s nodes. It also sets what each node reserves for the agent and the system, and when the pool removes nodes. Consolidation and expiry describes the disruption fields.

Example

This pool uses the gce class from Set up a node pool, and removes empty nodes after ten minutes. To select its nodes, use the label kiteplane.dev/nodepool: workers.

apiVersion: kiteplane.dev/v1alpha1
kind: NodePool
metadata:
  name: workers
spec:
  nodeClassRef:
    name: gce
  limits:
    nodes: "10"
    cpu: "20"
  disruption:
    consolidateAfter: 10m
    consolidationPolicy: WhenEmpty
    registrationTimeout: 10m

Fields

FieldRequiredMeaning
spec.nodeClassRef.nameYesThe NodeClass to use.
spec.weightNoThe pool’s place in the order that the controller tries pools: higher first, then by name. 0 to 100. Default: 0.
spec.template.labelsNoLabels copied to every claim and node the pool creates.
spec.template.taintsNoTaints copied to every claim and node the pool creates.
spec.template.kubeReservedNoThe cpu, memory or ephemeral-storage that each node the pool creates reserves out of its allocatable. Defaults: cpu: 100m, memory: 256Mi.
spec.limitsNoMaximum totals of nodes, cpu, memory, pods and ephemeral-storage across the pool, including pending claims. The pool ignores any other key. Unset: no limit.
spec.queueing.reserveAfterNoHow long a pod can wait on the pool’s limits before the pool reserves its capacity for the pod. Unset: no reservation.
spec.disruption.consolidateAfterNoHow long a node must stay removable under consolidationPolicy before the pool removes it. Unset: no consolidation.
spec.disruption.consolidationPolicyNoWhenEmpty (default) or WhenEmptyOrUnderutilized.
spec.disruption.expireAfterNoMaximum node age. Unset: no expiry.
spec.disruption.terminationGracePeriodNoMaximum time to drain a node. Defaults to 5 minutes.
spec.disruption.registrationTimeoutNoHow long a new claim has to register before Kite deletes its machine. Defaults to 10 minutes.
spec.disruption.unreachableTimeoutNoHow long a node may stay unreachable before Kite deletes its machine. Defaults to 30 minutes.
spec.disruption.budgetsNoHow many of the pool’s nodes consolidation and drift may remove at once. Unset: one budget of nodes: 10%. An empty list sets no limit. See Disruption budgets.
spec.disruption.budgets[].nodesYesA count, such as 3, or a percentage of the pool’s nodes, such as 10%, rounded up.
spec.disruption.budgets[].reasonsNoThe kinds of removal that the budget limits: Empty, Underutilized or Drifted. Unset: all three.
spec.disruption.budgets[].scheduleNoA cron schedule, in UTC, when the budget starts to apply. Set it with duration. Unset: the budget always applies.
spec.disruption.budgets[].durationNoHow long the budget applies after each time the schedule matches, such as 8h.

Set limits on every pool (Limits and placement).

NodePool status

FieldMeaning
status.unavailableThe provider’s capacity refusals. See Capacity refusals.
status.reservedForThe pod that the pool reserves its capacity for, by its namespace, name and uid. Absent while the pool reserves capacity for no pod.
status.conditionsUnreachableDeletionPaused is True while more than one node, and more than a fifth of the cluster’s nodes, are unreachable. While it is True, the pool deletes no machine for being unreachable.
status.resourcesThe pool’s totals of nodes, cpu, memory, pods and ephemeral-storage, counted as spec.limits counts them: every claim of the pool, pending ones included, except a claim being deleted or one that failed. Each machine counts at the size the pool plans it at. The pool writes it each time it reconciles.

The pool records a Warning event when the UnreachableDeletionPaused pause starts.

Durations

A duration is one or more whole numbers, each followed by ms, s, m or h, such as 90s or 1h30m.

Capacity refusals

A capacity refusal is an error in which the provider refuses a machine for lack of capacity or quota. status.unavailable lists each refusal with these fields:

  • nodeClass, machineType and location.
  • attempts.
  • retryAt, in Unix milliseconds.
  • The provider’s message and code.

These GCP codes count as capacity refusals:

  • ZONE_RESOURCE_POOL_EXHAUSTED
  • ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS
  • RESOURCE_POOL_EXHAUSTED
  • QUOTA_EXCEEDED

These AWS codes count too:

  • InsufficientInstanceCapacity
  • Unsupported
  • SpotMaxPriceTooLow
  • VcpuLimitExceeded
  • MaxSpotInstanceCountExceeded
  • InstanceLimitExceeded

An AWS instance that stops with Server.InsufficientInstanceCapacity also counts. No DigitalOcean error counts. Any other error does not make the controller fall back to another zone, machine type or pool.

When the provider takes back a Spot machine, the controller adds an entry with the code SpotReclaimed. The controller then waits 30 minutes before it uses that machine type in that location again. The wait doubles with each further reclaim in a row, up to 6 hours.

Deletion

Each NodePool has the finalizer kiteplane.dev/termination. A deleted pool keeps its deletionTimestamp and stays listed until the provider lists none of its machines.

kite deploy destroy deletes the pools. To remove a cluster another way, first delete each pool through the cluster’s API, then wait until /apis/kiteplane.dev/v1alpha1/nodepools lists none. A machine whose cluster is gone keeps running until you delete it.

NodeClaim

A NodeClaim tracks one machine from creation until its node registers. Kite creates and deletes claims. Do not create one yourself.

FieldMeaning
metadata.annotations["kiteplane.dev/nodeclass-hash"]A hash of the class fields that the machine was built with, such as its image, disk and runtimes, taken when the machine was created. When the class’s hash differs, Kite treats the node as drifted.
spec.nodePoolThe pool that created the claim.
spec.nodeClassThe class that supplied the provider settings.
spec.machineTypeThe machine type that the controller chose from the class’s list.
spec.locationThe zone or region that the controller chose.
spec.labelsThe pool’s template labels, plus the node labels below.
spec.taintsCopied from the pool.
spec.kubeReservedCopied from the pool’s template.kubeReserved.
status.phasePending, Provisioning, Registered, or Failed.
status.instanceNameThe instance name that Kite requested from the provider.
status.instanceIdProvider’s instance ID.
status.addressesThe addresses the provider gave the machine, private and public, IPv4 and IPv6.
status.locationProvider location.
status.imageThe image that the machine uses, when Kite knows it.
status.storageThe diskGiB, diskType, and localSsdCount that the machine uses.
status.nodeNameNode name after registration.
status.joinTokenHashSHA-256 of a one-time join token, for machines that cannot attest.
status.callerIdentityOn AWS, the account, role and STS endpoint a join is checked against.
status.conditionsLaunched and Registered, with a reason and message when not True.
status.capacityFailureThe provider’s code and message, while Kite confirms that a failed machine is gone.

Node labels

Every node that a pool creates has these labels. A pod can select nodes by them. A pool’s template.labels cannot change them.

LabelValue
kiteplane.dev/nodepoolThe pool’s name.
topology.kubernetes.io/zoneThe zone, on GCE and EC2.
topology.kubernetes.io/regionThe region.
node.kubernetes.io/instance-typeThe machine type.
kiteplane.dev/providergcp, aws or digitalocean.
kiteplane.dev/capacity-typespot or on-demand.

A node whose class lists a runtime in spec.runtimes also has the label runtime.kiteplane.dev/<runtime>: "true", such as runtime.kiteplane.dev/gvisor: "true".