Install
Install on bare machines
opodcp infra reads every host, runs a host gate, installs k3s server and agents over SSH, labels the nodes and writes a kubeconfig.
In short
This is Path B: Linux machines with GPUs and SSH, and no Kubernetes yet. opodcp infra builds a k3s cluster (a cell) over SSH, with one server or, in 0.3.0, three servers behind one virtual IP, labels the nodes and writes a kubeconfig. Then you install the chart exactly as on any cluster. You write one inventory file; infra plan shows what would change, and infra up changes it.
SSH is the only transport. The installer changes nothing on a host until you run infra up, and it never touches a host marked skip: true. It does not install GPU drivers: install the vendor driver (and, for NVIDIA, the container toolkit) yourself first.
When you need it
- You have GPU machines in a lab, a colocation rack or a cloud account, and no Kubernetes on them.
- You want one small cell to try opod, with k3s and nothing else installed by hand.
- You add a machine to a cell that
opodcp infrabuilt, or rebuild one after the hosts were re-imaged.
Do it
Get the binary
The
opodcpbinary ships inside the image. Copy it out on a Linux machine that can reach every host over SSH:id=$(docker create ghcr.io/opod-io/opodcp:0.3.6) docker cp "$id":/opodcp ./opodcp && docker rm "$id" ./opodcp versionWrite the inventory
# machines.yaml cell: prod-eu1 # cluster name and node label opod.io/cell ssh: { user: ubuntu, keyFile: ~/.ssh/id_ed25519, sudo: true } servers: - { name: cp-1, host: 192.0.2.10 } agents: - { name: gpu-1, host: 192.0.2.11 } # vendor detected on the host - { name: gpu-2, host: 192.0.2.12, labels: { topology.kubernetes.io/zone: eu1-b } }On
0.2.1the server is one field,server: { name: cp-1, host: 192.0.2.10 }; the listservers:is new in0.3.0. Every field is in The inventory below; three servers are in Three servers.Plan
./opodcp infra plan -f machines.yamlIt gathers each host's facts, runs the host gate and shows what would change. Nothing is changed. A good plan prints one
gateline per host and one planned (·) k3s step per host:✔ gate [cp-1] … · none · 32GB · no k3s ✔ gate [gpu-1] … · nvidia · 128GB · no k3s ✔ gate [gpu-2] … · nvidia · 128GB · no k3s · k3s.server [cp-1] install k3s server v1.31.6+k3s1 · k3s.agent [gpu-1] install k3s agent v1.31.6+k3s1 · k3s.agent [gpu-2] install k3s agent v1.31.6+k3s1 plan: 3 to install, 0 already installed — run: opodcp infra up -f machines.yamlThe last line arrives in the release after 0.3.6: it counts what
upwould install and what already runs k3s, and names the next command.A failed row prints under its host as
FATAL,warnorinfo, its id, the message and→a remedy. Fix it, or mark the hostskip: true.Converge
./opodcp infra up -f machines.yamlIt installs the k3s server, then the agents, sets the labels
opod.io/cell,opod.io/roleandopod.io/gpu-vendor, and writes a kubeconfig to~/.opodcp/<cell>/kubeconfig. Each step records a proof:✔ k3s.server [cp-1] https://192.0.2.10:6443 ready ✔ kubeconfig [cp-1] /home/ubuntu/.opodcp/prod-eu1/kubeconfig ✔ k3s.agent [gpu-1] Ready · vendor=nvidia ✔ k3s.agent [gpu-2] Ready · vendor=nvidia kubeconfig: /home/ubuntu/.opodcp/prod-eu1/kubeconfigk3s servers are installed with
--secrets-encryption, so Secrets are encrypted at rest. Running it again is safe: a step that is already converged is not repeated. When the machine you run it on is the server, add--local: server steps run locally and agents over SSH.Check the cluster
./opodcp preflight --kubeconfig ~/.opodcp/prod-eu1/kubeconfigInstall the chart
export KUBECONFIG=~/.opodcp/prod-eu1/kubeconfig kubectl create namespace opodcp kubectl -n opodcp create secret generic opod-state --from-literal=dsn='postgres://opod:PASSWORD@db.example.com:5432/opodcp?sslmode=require' helm install opodcp oci://ghcr.io/opod-io/charts/opodcp -n opodcp \ --set ports.state.dsnSecret.name=opod-state --set cell.name=prod-eu1On a LAN with no Ingress, add
--set service.type=NodePort --set service.nodePort=30080.ports.state.dsnSecretis new in0.3.0; on0.2.1leave it out. Then sign in as in Install on Kubernetes, step 4.
Check it worked
kubectl get nodes -L opod.io/cell,opod.io/role,opod.io/gpu-vendor
./opodcp infra verify -f machines.yamlA good answer lists every host Ready, each with your cell name, its role (server, or worker on an agent) and its vendor. infra verify runs the host gate and the cluster preflight again, changes nothing, and exits 0. After the chart is installed, the console's Machines page lists the same nodes.
If it fails
| Symptom | Cause | Fix |
|---|---|---|
gate failed — nothing changed, then error: plan did not complete cleanly (from the release after 0.3.6: error: infra plan did not complete cleanly — the ✘ rows above say why; every step is in ~/.opodcp/<cell>/runs.jsonl) | a host has a fatal row | read the FATAL lines printed under that host; fix them or set skip: true |
a gate step fails with remedy ssh user/key/port in the inventory; host must run bash | SSH could not log in | check ssh.user, ssh.keyFile and ssh.port; try ssh -i KEY USER@HOST true |
FATAL priv.root | the SSH user has no passwordless sudo | grant NOPASSWD sudo, or set ssh.user: root |
FATAL gpu.toolkit | an NVIDIA host has no nvidia-container-toolkit | install it, then plan again |
k3s.agent fails with host reachable but :6443 closed | the agent reaches the server, but the k3s port is closed | open TCP 6443 on the server firewall |
k3s.server fails with remedy journalctl -u k3s on the server | the k3s install failed | read that journal on the server |
k3s.server fails with REFUSED: this host runs a single k3s server | the inventory lists three servers, and the first one already runs a one-server cluster | the installer does not convert a running cluster: opodcp backup, opodcp infra down, infra up with three servers, then restore |
vip fails with the API does not answer on the vip | kube-vip did not take the address | k3s kubectl -n kube-system logs ds/kube-vip-ds on the first server; check net.vip.segment |
FATAL net.vip.free | something on the network already answers on the VIP | pick another free address, outside the DHCP range |
FATAL net.vip.segment | the VIP is behind a router from that server | pick an address in the subnet the three servers share: ARP does not cross a router |
k3s.agent fails with remedy kubectl describe node gpu-1 | the agent joined but did not turn Ready within the wait | read the node's conditions |
| a host key changed after a re-image | --known-hosts holds the old key | remove that host's line from ~/.opodcp/known_hosts, or pin the new key as hostKey |
The inventory
| Field | Default | Meaning |
|---|---|---|
cell | — | cell name: the k3s cluster name and the opod.io/cell label |
k3sVersion | v1.31.6+k3s1 | pinned k3s version |
ssh.user, ssh.keyFile, ssh.port | —, ~/.ssh/id_ed25519, 22 | SSH defaults for every machine |
ssh.sudo | — | run privileged steps with sudo -n; otherwise the user must be root |
servers[] | — | the k3s servers: one, or three for a cluster that survives a server. Two is refused: etcd with two members stops when either one does. On 0.2.1 this is the single field server |
vip | — | with three servers: a free IPv4 address on the servers' own subnet, outside any DHCP range. Required with three servers, refused with one |
agents[] | — | the k3s agents |
labels | — | extra labels on every node |
modelCache | /data/models | the host directory for model weights |
A fuller inventory that uses every per-machine field:
cell: prod-eu1
k3sVersion: v1.31.6+k3s1
ssh: { user: ubuntu, keyFile: ~/.ssh/id_ed25519, port: 22, sudo: true }
labels: { opod.io/site: eu1 } # on every node
modelCache: /mnt/nvme/models # a fast disk for weights
servers:
- { name: cp-1, host: 192.0.2.10, vendor: none }
agents:
- { name: gpu-1, host: 192.0.2.11, nodeIP: 10.0.0.11 } # SSH on one network, k3s on another
- { name: gpu-2, host: gpu-2.example.com, user: root, port: 2222,
hostKey: "ssh-ed25519 AAAAC3Nza…" } # pinned host key
- { name: amd-1, host: 192.0.2.13, vendor: amd } # vendor stated, checked against the host
- { name: old-1, host: 192.0.2.14, skip: true } # never touchedAnd a converge that refuses any host key it does not already know, waits longer per command, and keeps its state beside the inventory:
./opodcp infra up -f machines.yaml --strict-host-keys --known-hosts ./known_hosts \
--timeout 40m --state ./state --json > run.json--json prints the run (every step with its proof) on stdout; the progress lines stay on stderr.
Per machine: name (the node name), host (the SSH address), nodeIP (k3s --node-ip, default host when it is an IP), user, port, vendor (nvidia, amd, intel, tt or none; empty = detect on the host), labels, skip and hostKey (a pinned SSH host key).
Three servers
This is new in 0.3.0, and it is not yet proven on hardware.
One server is a single point of failure for the cluster itself: the control plane's replicas keep running when their node dies, but nothing schedules, heals or answers kubectl while the server is down. Three servers keep the Kubernetes API up when any one is lost.
cell: prod-eu1
ssh: { user: ubuntu, keyFile: ~/.ssh/id_ed25519, sudo: true }
servers:
- { name: cp-1, host: 192.0.2.10, vendor: none }
- { name: cp-2, host: 192.0.2.11, vendor: none }
- { name: cp-3, host: 192.0.2.12, vendor: none }
vip: 192.0.2.50 # free, same subnet as the servers, outside DHCP
agents:
- { name: gpu-1, host: 192.0.2.21 }What infra up then does, in order:
- The first server starts embedded etcd (
--cluster-init) with the VIP in its certificate. Before k3s starts, the installer writes kube-vip (ghcr.io/kube-vip/kube-vipv1.3.1, pinned by digest) into k3s's auto-deploy directory. kube-vip announces the VIP by ARP from whichever server holds its lease. It covers the Kubernetes API only, and Services stay with k3s. - Step
vipwaits until the API answers onhttps://<vip>:6443. - The other two servers join through the VIP (
--server https://<vip>:6443). - The kubeconfig is written for the VIP, and every agent joins through it. A lost server then costs no agent and no
kubectlits way in.
infra plan adds two fatal rows per server: net.vip.segment (the VIP is on that server's subnet) and net.vip.free (nothing answers on it yet). The installer refuses to convert a running one-server cluster to three in place.
For the control plane itself, run replicas: 3 (High availability). To reach the console at the VIP, use service.type=NodePort: a NodePort answers on every address of the node that holds the VIP, the VIP included. This is expected, not yet proven.
Commands
| Command | What it does |
|---|---|
opodcp infra plan -f FILE | facts and host gate, no changes |
opodcp infra up -f FILE | converge: k3s server and agents, labels, kubeconfig. A kubeconfig it cannot fetch fails the run, with the command that fetches it by hand (the release after 0.3.6) |
opodcp infra verify -f FILE | host gate plus the cluster preflight, no changes. With no kubeconfig yet it exits 1 and says to run infra up first (the release after 0.3.6; 0.3.6 skips the cluster check and exits 0) |
opodcp infra down -f FILE | uninstall k3s from every machine; asks first, --yes skips the question. From the release after 0.3.6, answering no removes nothing and exits 0, and with no terminal it refuses and prints the --yes command (0.3.6: error: aborted, exit 1) |
| Flag | Default | Meaning |
|---|---|---|
-f | machines.yaml | inventory file |
--local | false | the server is this machine (no SSH to it) |
--state | ~/.opodcp/<cell> | state directory (kubeconfig, run log) |
--json | false | print the run as JSON |
--timeout | 20m | per-command timeout |
--yes | false | skip the confirmation of down |
--known-hosts | ~/.opodcp/known_hosts | the SSH known_hosts file the installer keeps |
--strict-host-keys | false | refuse a host whose key is neither pinned nor already known (no trust on first use) |
infra down deletes every pod and the cluster state on those machines. Back up the control plane's database first if you want to keep it.
The host gate
infra plan and infra up read every host's facts and judge each machine. A host with a fatal row is never converged; fix it, or mark it skip: true in the inventory.
| Row | Severity | Passes when | Remedy |
|---|---|---|---|
os.linux | fatal | Linux on x86_64 or aarch64 | Windows hosts are not supported |
os.cgroupv2 | fatal | cgroup v2 is mounted | boot with systemd.unified_cgroup_hierarchy=1 (the default from Ubuntu 22.04) |
priv.root | fatal | the SSH user is root or has passwordless sudo -n | grant NOPASSWD sudo, or SSH as root |
host.ram | fatal | at least 8 GB of RAM on an agent, 16 GB on the server | add RAM, or move the server role to a host with 16 GB or more (the remedy is printed from the release after 0.3.6) |
host.disk.root | warning | at least 40 GB free on /, for images | free space, or move the containerd root |
host.disk.cache | warning | at least 100 GB free for the model cache directory | mount an NVMe disk there |
host.time | warning | the clock is NTP-synchronised | enable systemd-timesyncd or chrony: TLS and join tokens need a sane clock |
k3s.role | fatal, only when k3s is already there | it runs in the role the inventory gives this host | uninstall it (k3s-uninstall.sh, k3s-agent-uninstall.sh) or fix the inventory |
gpu.vendor | fatal on a mismatch, else information | the inventory's vendor matches what the host reports | fix the inventory or the drivers |
gpu.driver | fatal on NVIDIA, warning otherwise | the vendor's kernel driver is loaded: NVIDIA, amdgpu, i915/xe, tt-kmd | install the driver (Tenstorrent also needs hugepages) |
gpu.toolkit | fatal, NVIDIA only | nvidia-container-toolkit is installed | install it; k3s then registers RuntimeClass nvidia by itself |
gpu.present | warning, agents only | an accelerator is detected | a host with none can hold leaders and the control plane, not engines |
net.vip.segment | fatal, servers of three only | the VIP is on the server's own subnet (no router between) | pick an address in the subnet the servers share |
net.vip.free | fatal, servers of three, before k3s is installed | nothing answers ping on the VIP | pick another free address, outside DHCP |
net.server | fatal, agents only | the agent reaches the server on port 6443, tested from the agent | host reachable but :6443 closed: run the server step first or open 6443; cannot reach: give the agent a route to the server. An agent behind NAT only needs to dial out |
Requirements → Nodes has the same thresholds from the buyer's side.
Last updated · Source: content/docs/control-plane-install/bare-metal.mdx · View as Markdown