First cluster
This walkthrough builds a cluster from one Cluster manifest: PKI, the first controller, optional workers, and the desired release.
1. Boot the machines
Write the kcore ISO to USB and boot each server from it. The live agent listens on :9091. Optionally inspect hardware:
kctl --node 192.168.40.107:9091 -k node disks
kctl --node 192.168.40.107:9091 -k node nics
Identify the OS disk (e.g. /dev/sda) and any data disks.
2. Apply the cluster
One file declares nodes and version:
kctl apply -f cluster.yaml
# 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.
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 creates the CA and client certs if needed, installs every live-ISO node, waits for the controller, and calls SetClusterVersion. It does not wait for the canary soak.
Re-running the same manifest is safe: registered nodes are skipped and an unchanged version starts no rollout.
After the first controller reboots: controller on :9090, agent on :9091, dashboard at http://192.168.40.107:8080. Nodes are auto-approved by default.
4. Verify the cluster
After the node reboots, kctl connects over mTLS using the context created in step 1. No -s or -k flags needed:
kctl get nodes
data "kcore_nodes" "all" {}
output "node_hostnames" {
value = [for n in data.kcore_nodes.all.nodes : n.hostname]
}
Expected output:
ID ADDRESS DC STATUS APPROVAL CERT EXPIRY LUKS
kvm-node-192-168-40-107 192.168.40.107:9091 DC1 ready approved 364d TPM2
The node shows status ready and approval approved. Your single-node cluster is operational.
5. Create your first VM
kctl create vm web-01 \
--image https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2 \
--image-sha256 <sha256> \
--network default \
--storage-backend filesystem \
--storage-size-bytes 42949672960 \
--wait-for-ssh
kind: VM
metadata:
name: web-01
spec:
cpu: 2
memoryBytes: "4G"
storageBackend: filesystem
storageSizeBytes: "40G"
sshKeys:
- my-key
nics:
- network: default
disks:
- image: https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2
sha256: "<sha256>"
format: qcow2
Apply: kctl apply -f web-01.yaml
image_url and image_path are mutually exclusive. URL mode needs image_sha256. cpu and memory_bytes are required.
resource "kcore_vm" "web" {
name = "web-01"
cpu = 2
memory_bytes = 4 * 1024 * 1024 * 1024
storage_backend = "filesystem"
storage_size_bytes = 40 * 1024 * 1024 * 1024
image_url = "https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2"
image_sha256 = "<sha256>"
ssh_key_names = ["my-key"]
nic {
network = "default"
}
}
See VM creation for all options including YAML manifests, SSH keys, and cloud-init.
Next steps
- Add more nodes — agent-only nodes, HA controllers, cross-DC.
- Upload images — for air-gapped or large image files.
- Create networks — NAT, bridge, or VXLAN overlay.