How kcore is built. Go control plane, NixOS host, gRPC APIs, multi-node topology.
kcore is a virtualization platform with a distributed architecture. A central controller manages cluster state while node agents run on each physical machine, managing VMs through libvirt. All communication is via gRPC with mTLS.
The host OS is NixOS — fully declarative and immutable at runtime. The control plane is written in Go. There is no PHP, no Perl, no legacy web framework. The API is the product.
The controller is a single Go binary that manages cluster state. It exposes a gRPC API that the CLI, Terraform provider, MCP server, and any other tooling consumes.
// API surface (simplified)
service KcoreService {
rpc ListVMs(ListVMsRequest)
returns (ListVMsResponse);
rpc CreateVM(CreateVMRequest)
returns (VM);
rpc DeleteVM(DeleteVMRequest)
returns (Empty);
rpc ListNodes(Empty)
returns (ListNodesResponse);
rpc GetNodeStatus(NodeRequest)
returns (NodeStatus);
}
Each compute node runs NixOS. The entire system configuration is defined in Nix — packages, services, network, storage. The system is immutable at runtime. Changes require a rebuild that produces a new bootable generation.
install-to-disk, reboot# Node configuration (simplified)
{
services.kcore-agent = {
enable = true;
controllerAddr = "10.0.0.1:9090";
};
virtualisation.libvirtd = {
enable = true;
qemu.runAsRoot = true;
};
networking = {
bridges.br0.interfaces =
[ "enp3s0" ];
useDHCP = true;
};
fileSystems."/var/lib/kcore" = {
device = "/dev/vg0/kcore";
fsType = "ext4";
};
}
The API is the primary interface to kcore. Everything the CLI can do, the API can do. Everything a Terraform provider needs, the API provides. AI agents interact through the same API — no special endpoints, no separate "agent mode."
$ grpcurl -d '{}' \
localhost:9090 \
kcore.v1.KcoreService/ListVMs
{
"vms": [
{
"name": "web-01",
"status": "RUNNING",
"node": "node-01",
"memory_mb": 4096,
"vcpu": 4,
"storage_gb": 50
}
]
}
Use the storage backend that fits your hardware and use case.
Store VM disk images as files on a local filesystem. Simple, fast, no dependencies. Good for single-node setups and home labs.
AvailableLogical Volume Manager for flexible disk allocation. Thin provisioning, snapshots. Recommended for multi-VM hosts.
AvailableCopy-on-write filesystem with built-in snapshots, compression, and checksumming. Ideal for data integrity and advanced storage needs.
PlannedThe same API serves every interface. No special cases.
Primary operator tool. Create, manage, and inspect VMs and nodes. Thin wrapper around the gRPC API.
AvailableManage kcore resources as infrastructure as code. Integrates with existing Terraform workflows.
In ProgressModel Context Protocol server for AI agent integration. Agents query and manage infrastructure through structured tools.
In ProgressRead-only cluster visibility. The dashboard consumes the API — it does not have special access.
PlannedRead the documentation for setup guides, API reference, and CLI usage. Or reach out if you want to discuss the architecture.