Installation
System requirements
- Linux host (x86_64) with a KVM-enabled CPU (Intel VT-x or AMD-V).
- 4 GB RAM minimum, 8 GB+ recommended.
- 20 GB+ free disk space for the OS; additional disks for VM storage.
- Network access between all nodes and at least one controller.
Overview
One kind: Cluster manifest (or one kcore_cluster resource) declares the release, the update policy, and every node. Apply it once: it creates the PKI if needed, installs any node still on the live ISO, and sets the desired version. The controller then converges nodes onto that version with the usual canary rollout.
- Boot each machine from the kcore ISO so the live agent answers on
:9091. - Apply the cluster manifest — PKI, installs, and
SetClusterVersionin one step. - Verify with
kctl get nodesandkctl update version get.
Boot the kcore ISO
Download the kcore NixOS ISO and write it to a USB drive. Boot each target machine from it. The live environment starts a node-agent on port 9091 that accepts install commands. The default root password is kcore.
Apply the cluster
On your operator workstation, write one manifest. Controllers are listed first. version is the release every node should run; update.reboot only forces a reboot for nodes a rollout actually updates.
kctl apply -f cluster.yaml
# or, for a dry run of what each node would do:
kctl apply -f cluster.yaml --dry-run
# cluster.yaml
kind: Cluster
metadata:
name: prod
spec:
version: v0.8.3
update:
reboot: false
drainVms: true
soak: 1h
canaryNode: node-105
nodes:
- name: node-107
address: 192.168.40.107
osDisk: /dev/sda
controller: true
- name: node-105
address: 192.168.40.105
osDisk: /dev/sda
Apply: kctl apply -f cluster.yaml
Showing Terraform examples. Provider source is kcorehypervisor/kcore, version 0.8.3.
kcore_cluster writes the trust material to certs_dir, installs node blocks that are still on the live ISO, and sets version. Prefer this over separate kcore_node and kcore_cluster_version resources.
terraform {
required_providers {
kcore = {
source = "kcorehypervisor/kcore"
version = "0.8.3"
}
}
}
provider "kcore" {
controller_address = "192.168.40.107:9090"
tls_cert_path = "${path.module}/certs/kctl.crt"
tls_key_path = "${path.module}/certs/kctl.key"
tls_ca_path = "${path.module}/certs/ca.crt"
}
resource "kcore_cluster" "prod" {
name = "prod"
version = "v0.8.3"
certs_dir = "${path.module}/certs"
update {
reboot = false
drain_vms = true
}
node {
name = "node-107"
address = "192.168.40.107"
os_disk = "/dev/sda"
controller = true
}
node {
name = "node-105"
address = "192.168.40.105"
os_disk = "/dev/sda"
}
}
Apply is idempotent: existing PKI is kept, registered nodes are skipped, and an unchanged version starts no rollout. Certificate material lands under the certs directory and in ~/.kcore/config.
To overwrite an existing CA deliberately, use kctl create cluster --force. The Cluster manifest refuses force.
What apply does on each node
For every node in the manifest the controller does not already list, apply probes the live ISO (ListDisks). If the agent answers, it installs to osDisk, waits for the controller or for registration, then continues. Nodes already registered are left alone.
The installer partitions the disk with LUKS (TPM2-sealed when available), deploys NixOS, configures mTLS, and reboots. After reboot the controller listens on :9090, the node-agent on :9091, and the dashboard on :8080.
kind: NodeInstall and kctl node install still work for one-off installs; the Cluster manifest is the default path.
Step 3 — Verify the cluster
After the node reboots, kctl connects over mTLS using the context created in step 1. No additional flags needed:
kctl get nodes
data "kcore_nodes" "all" {}
output "node_hostnames" {
value = [for n in data.kcore_nodes.all.nodes : n.hostname]
}
You should see the node with status ready and approval approved. The dashboard is available at http://<NODE_IP>:8080.
TLS modes
| Mode | Flag | Use case |
|---|---|---|
| mTLS (default) | none | Production — mutual certificate verification. Used for all post-install communication. |
| Insecure | -k / --insecure | Initial install only — the live ISO node-agent runs without TLS, so -k is required during kctl node install. After reboot all traffic switches to mTLS automatically. |
The -k flag is only needed during kctl node install when communicating with the live ISO. After the node is installed and rebooted, all communication uses mTLS. Never use -k with an installed cluster.
What the installer does
Each kctl node install performs the following non-interactively:
- Disk wipe — wipes all signatures and partition tables from the target disk.
- Partitioning — creates an ESP boot partition and a LUKS-encrypted root partition (TPM2-sealed when a TPM is available, key-file fallback otherwise).
- NixOS install — generates a NixOS configuration, installs the OS, and deploys kcore binaries.
- Certificate provisioning — copies the cluster CA and sub-CA, generates a host-specific controller certificate (if
--run-controller), and requests a node certificate from the controller (for agent-only installs). - Configuration — writes
controller.yaml,node-agent.yaml, anddashboard.envwith the correct addresses, replication peers, and TLS paths. - Reboot — unmounts all filesystems and reboots into the installed system.
Webhooks
After install, controller.yaml can POST JSON when a node misses heartbeats, a certificate enters the expiry window, or a VM runtime state changes. Delivery is asynchronous and can be signed with HMAC-SHA256.
webhooks:
enabled: true
endpoints:
- name: pager
url: https://hooks.example/kcore
secret: replace-me
events:
- node.heartbeat.missed
- cert.expiry.warning
- vm.state.changed
Scheduler
The same file sets placement headroom. scheduler.cpuOvercommit and scheduler.memoryOvercommit default to 1.0 and must be between 1.0 and 16.0. VM create uses that ceiling together with --label and --anti-affinity. See VM creation.
Next steps
- First cluster — full walkthrough with VM creation.
- Add a node — agent-only nodes, HA controllers, and cross-DC.