Skip to content
Open Kaisar App ↗

Legacy ZeroNode, Provider or KaiNode user? Your rewards are preserved.Legacy user?Check what you haveCheck your rewards

Run on Kubernetes

Applies to Kaisar Node CLI on Kubernetes 1.28+ with Helm · updated Nov 20, 2026 · 4 min read

Draft · pending reviewThis guide is a draft and may change.

The Helm chart runs the same image and kaisar run command as Docker. It is for operators running several servers; a desktop user never needs it. The chart and image are coming later; <chart>, <image> and <gateway> below are placeholders.

What the chart sets up

  • A StatefulSet, one pod per server. Each pod is one machine with its own node key and its own volume. A required anti-affinity rule never puts two Kaisar Node pods on the same server, even from two releases: one machine ID is one node. Pods beyond the number of servers stay Pending.
  • The node key on a volume, never in a Secret. The key is created inside the pod on first run and stored as a file on the pod's volume (PVC). The chart creates no Secret and no init container, and there is no way to export the key.
  • Volumes are kept. Uninstalling the chart or lowering replicas keeps every PVC. Deleting a PVC deletes that machine's key: remove the machine in Kaisar App › Node Hub, then link again.
  • A locked-down pod. Non-root (UID 65532), read-only root filesystem, no capabilities, seccomp RuntimeDefault, no Kubernetes API token.
  • Outbound traffic only to Kaisar. A NetworkPolicy allows port 443 to the Kaisar address ranges you list and DNS inside the cluster; nothing can connect in, except the metrics port when you turn it on.
  • 45 seconds to stop. On SIGTERM the node submits finished results and hands back held tasks.

Requirements

  • Kubernetes 1.28 or later, on Linux servers that each have their own /etc/machine-id. Cloned virtual machines need a new machine ID (error KN-2201).
  • A StorageClass for small ReadWriteOnce volumes. Use encrypted disks: anyone who can read the volume can read the node key.
  • Pod Security that allows a read-only hostPath to /etc/machine-id. The baseline and restricted levels block every hostPath, so this namespace needs an exception. Without the machine ID, linking is refused (error KN-1005).
  • A network plugin that enforces NetworkPolicy, such as Calico or Cilium.
  • The Kaisar address ranges for networkPolicy.egressCIDRs [TBA]. NetworkPolicy cannot filter by domain name.

Install

  1. Create the namespace:
kubectl create namespace kaisar
  1. Save your settings as values.yaml. For one machine, use the 6-digit code from Kaisar App › Node Hub › Add node:
image: { repository: <image>, tag: <version> }
gateway: { url: <gateway> }
replicas: 1
link: { code: "<code>", roles: provider }
networkPolicy: { egressCIDRs: [<Kaisar address range>] }
  1. Install the chart:
helm install kn <chart> -n kaisar -f values.yaml
  1. Follow the log, then choose Confirm link in Kaisar App within 10 minutes:
kubectl -n kaisar logs -f statefulset/kn-kaisar-node
  1. Check the node ID once the log shows the node running:
kubectl -n kaisar exec kn-kaisar-node-0 -- kaisar whoami
  1. Remove link.code from values.yaml before the next helm upgrade. A pod that already has its key ignores the code.

A link code only works with replicas: 1. Operator machines enroll with a token instead: put it in a Secret and set link.enrollToken.existingSecret.

Main values

Main values
ValueDefaultMeaning
gateway.urlrequiredNode gateway, https://
replicas1Number of machines, one pod per server
link.code or link.enrollToken.existingSecret—First link only
link.rolesproviderprovider, checker or both
run.groups[tcore.cpu]Task groups to accept
run.maxDownloadMbps, run.maxUploadMbpsnoneBandwidth limits for task data
persistence.size64MiVolume for the node key and profile
machineId.hostPath/etc/machine-idHost machine ID
metrics.enabledfalsePrometheus endpoint
networkPolicy.egressCIDRsrequiredKaisar address ranges

The chart refuses to render without egressCIDRs, with a value that is not a CIDR, or with a range wider than /8 (including 0.0.0.0/0).

DNS

The NetworkPolicy allows DNS to pods labelled k8s-app: kube-dns in kube-system. If your cluster DNS uses other labels (for example k8s-app: coredns or NodeLocal DNSCache), set networkPolicy.dns.namespaceSelector and networkPolicy.dns.podSelector; otherwise the pod cannot resolve the gateway.

Key folder permissions

The volume root gets group 65532 and the node keeps its key folder at 0700. If the kubelet changes permissions recursively (for example with fsGroupChangePolicy: Always), the key is refused (error KN-1105). Fix it in the running pod:

kubectl -n kaisar exec kn-kaisar-node-0 -- sh -c 'chmod 700 /var/lib/kaisar-node/node && find /var/lib/kaisar-node/node -type f -exec chmod 600 {} +'

If the pod keeps restarting, use kubectl debug or a temporary pod that mounts the same volume.

Metrics

Off by default. When on, the pod listens on its own IP, a token is required, and liveness (/healthz) and readiness (/readyz) probes are added. Metrics through the chart need an IPv4 pod IP. See Metrics and health checks.