Install · Quick Start · How it works · AI · CLI · Docs
Kubernetes, from your laptop to production: one CLI, one folder convention, the same workflow everywhere.
lok8s gives you a single CLI (lo) and a single per-domain folder layout for the whole journey. You start a throwaway cluster on your laptop, iterate with a live dev loop, and ship the exact same definitions to production. It does not replace the tools you already know: kustomize builds your manifests, Helm charts inflate in place, kind runs clusters locally, and Tilt powers the hot-reload loop. lok8s is the thin, opinionated orchestration around them. Thus clusters/<your-domain>/ means the same thing in dev, CI, and prod.
Open-sourced in 2026 after ~9 years running real production workloads. It is new to GitHub, but nearly a decade of real cluster operations shaped it.
- 🧰 Standard tools, not a walled garden. Targets are plain
kustomize builds. Helm charts inflate via the khelm kustomize plugin (nohelmCLI to install). TheloCLI and the folder convention are orchestration and ergonomics. The artifacts underneath are vanilla Kubernetes YAML you couldkubectl applyby hand. No lock-in: lok8s produces standard manifests you can take anywhere. - 💻 Dev-first, runs against any cluster. The default experience is a local
kindcluster with TLS, a registry mirror, and a Tilt hot-reload loop that just works.lo buildemits portableartifacts.yamlyou cankubectl applyto any cluster. The Hetzner/KubeOne/CAPI provisioners are a convenience for standing up production, not a requirement. - 🤖 AI built in, local-first.
lo chatis an on-device assistant for your cluster (read-only by default, with a code-enforced safety gate).lo mcpexposes thelocommands to agents like Claude Code over MCP. No data leaves your machine unless you explicitly opt into a frontier model. - 🧪 Nine years in production. The conventions here are not speculative. They are the residue of ~9 years in production: we kept what survived contact with reality and dropped the rest.
- 🐚 Transparent and debuggable.
lois one static Go binary, but it still runs the samekubectl/kustomize/kindcommands you'd run by hand: orchestrated, not reimplemented.lo --verboseshows every command. The bash implementation the binary was ported from is embedded in it, frozen.lo assets eject bashputs it in your project, and the project'slok8s.yamlcan then route the ported commands to it. So you can always read, lint and step through the reference. (Why a Go binary, and why the bash stays)
A few principles shape every decision in lok8s:
- Production is the reference, and local dev is a reduced overlay of it. You do not learn one workflow for your laptop and a different one for prod. It is the same tree, the same commands, the same
cluster.lok8s.yaml. The local cluster is production with the expensive parts swapped out. - One cluster = one folder, keyed by FQDN. Everything about a cluster lives under
clusters/<fqdn>/. The domain is the identity, which makes multi-cluster and multi-environment setups obvious rather than clever. - Stand on standard tools. lok8s orchestrates kustomize, Helm (via khelm), kind, and Tilt. It does not reimplement them. If you know those, you already know most of lok8s.
- Two concerns, kept apart. Cluster creation (a pluggable driver) is separate from cluster content (kustomize targets). Swapping how a cluster is born never touches what runs on it.
- Minimal magic, maximal transparency. Rendered artifacts are plain YAML. Every external call is a tool you could run yourself (
lo --verboseprints it). The only ordering primitive is an explicitspec.bootstraplist. When something breaks, you can see exactly what ran.
Honesty up front: lok8s is opinionated, and that does not fit everyone.
Reach for lok8s when you want to…
- Have the same workflow from local kind to production instead of maintaining two parallel setups.
- Manage one or many clusters with a clear, FQDN-keyed folder convention.
- Keep a fast local dev loop (Tilt hot-reload, local registry, working TLS) without bespoke glue.
- Use kustomize + Helm charts as your manifest layer and want ergonomics around them.
- Provision on Hetzner (kind/KubeOne/CAPI) with sensible, batteries-included defaults, or just deploy to a cluster you already have.
Look elsewhere (or use lok8s only for the deploy side) when…
- You are fully invested in a managed platform's native workflow (EKS/GKE/AKS + their tooling) and do not want another convention on top.
- You prefer a pure-GitOps, controller-driven model (Argo/Flux as the source of truth). lok8s can emit manifests for that, but its dev loop is CLI/Tilt-centric, and the in-tree
lo gitopslayer is not complete yet. - You need ready-made production provisioning on a cloud other than Hetzner today. The provisioning drivers currently target Hetzner. (You can still deploy lok8s-built artifacts to any cluster that you provision yourself.)
- A tool with no bash anywhere is a hard requirement for your team.
lois a single binary, but a project still carries the framework tree (.lok8s/), the Hetzner provider plugin is bash, andbash ≥ 4.3is a prerequisite.
lo is a single static binary (linux/darwin × amd64/arm64), attached to every
GitHub release with a
checksums.txt. Download, verify, then run. Nothing here is piped into a shell:
curl -fsSLO https://github.com/kernpilot/lok8s/releases/latest/download/lo-install.sh
curl -fsSLO https://github.com/kernpilot/lok8s/releases/latest/download/checksums.txt
sha256sum --ignore-missing -c checksums.txt # macOS: shasum -a 256 --ignore-missing -c checksums.txt
less lo-install.sh # read it first
bash lo-install.sh # → ~/.local/bin/lo (--dir, --version, --full, --dry-run)The installer fetches lo-<os>-<arch>.tar.gz and checksums.txt from the
release, refuses to extract anything whose SHA-256 does not match, and only
then installs lo. Each release has its notes under
docs/releases/ and on the
GitHub release page. To move a
project from the argsh tree to the binary, follow
Upgrade an existing project
in the v0.3.0 notes, the release that introduced the binary.
Prefer no script at all? The same four steps by hand:
V=v0.15.1; A=lo-linux-amd64.tar.gz # your tag and platform
curl -fsSLO "https://github.com/kernpilot/lok8s/releases/download/${V}/${A}"
curl -fsSLO "https://github.com/kernpilot/lok8s/releases/download/${V}/checksums.txt"
sha256sum --ignore-missing -c checksums.txt
tar -xzf "${A}" lo && install -m 0755 lo ~/.local/bin/loTwo builds, one tree. lo (the default, ~50 MB) is the core build: it
runs the manifest render through the pinned kustomize binary and the two
exec generators (khelm's ChartRenderer, the secrets.lok8s.dev Secret
plugin) that lo toolchain install installs into the project with b. lo-full
(bash lo-install.sh --full, ~120 MB) links the same kustomize API and khelm
release into the binary and renders in-process, with no kustomize, khelm or
.kustomize/ needed. Both install as lo; lo --version names the build
((core) / (full)), and both render byte-identical output. That is the
gate, see the Go binary reference.
Then scaffold a project: lo init project writes clusters/, lok8s.yaml,
the .gitignore entries and a mise.toml (files only, no network).
--cluster lok8s.dev also writes the first cluster spec.
lo toolchain install writes .bin/b.yaml, installs
b itself into .bin/ (pinned release,
SHA-256-verified, no curl | sh) and runs b install for the pinned toolchain
(kubectl, kustomize, khelm, the Secret plugin; kind, Tilt, mkcert for the dev
loop). The framework assets a cluster references are embedded in the binary
and ejected into .lok8s/ on first use:
mkdir my-project && cd my-project
lo init project --cluster lok8s.dev # the project files + the lok8s.dev cluster spec
lo toolchain install # b + the pinned toolchain into .bin/
lo toolchain doctor # b, kustomize, khelm and the Secret plugin at the pinsJoining a project that already has .bin/b.yaml? lo toolchain install never
overwrites it. It prints a diff against the pins this lo was built with,
and b install reproduces the committed b.lock. The full profile-based
path (b env add github.com/kernpilot/lok8s#local && b install, which also
syncs the framework tree and the frozen bash reference) is documented in
The Toolchain.
Other ways (use mise, clone the repo) · legacy (argsh) install
Prefer mise? A mise.toml ships at the repo root:
mise install && mise activate provisions the same toolchain. Then lo doctor to verify.
Cloning the repo directly? The argsh runtime is vendored in .bin/, so
lo doctor runs immediately and tells you which tools are still missing, with no
b install needed just to diagnose the environment. make build produces the
Go binary at bin/lo.
Legacy (argsh) install. New installs use lo-install.sh (above; also
served at lok8s.io/lo-install.sh). Before
the Go binary, a self-contained argsh script (lo-up) bootstrapped a
project: it installed b, the profile and the toolchain in one go. It does not
install the Go binary. It is retired, not removed: the source and build live
under .archive/legacy/install/ and the
published bundle stays at lok8s.io/lo-up for
existing users. Download and read it before running it:
curl -fsSL https://lok8s.io/lo-up -o lo-up && less lo-up && sh lo-up.
Profiles. Each one ships only the binaries it needs:
| Profile | Adds | Use case |
|---|---|---|
core |
framework only | Remote deploy only (no kind/Tilt) |
kustomize |
kustomize plugins | Standalone kustomize plugin use |
local |
kind, Tilt, mkcert | Local dev (recommended starting point) |
capi |
clusterctl, hcloud |
Cluster API provisioning |
kubeone |
kubeone, hcloud |
KubeOne provisioning |
A b profile does not write clusters/lok8s.dev/, and neither does lo init project without --cluster. lo init cluster lok8s.dev writes its spec: a local kind cluster on a Docker bridge. Bring your own FQDN later, or use *.[N].lok8s.dev for multiple projects.
Prerequisites: Docker, and bash ≥ 4.3 (macOS ships 3.2 — brew install bash). Everything else comes from b (or mise). Run lo doctor to check.
From zero to a running local cluster with a live dev loop:
lo init cluster lok8s.dev # if lo init project --cluster did not write the spec: write it
lo use lok8s.dev # select the active domain
lo up # create the kind cluster, bootstrap infra, start Tilt
# → Tilt UI on the URL it prints (per-domain port, 10351–10499)
lo status # Running ✓
lo down # tear it all down when you're doneThat's the interactive loop. For headless/CI or deploying to a remote cluster, the same definitions drive a build → deploy pipeline:
lo build # render the domain kustomization → clusters/<domain>/artifacts.yaml
lo deploy # apply built artifacts (CRDs first, then resources, with health waits)
lo lint # validate specs, bootstrap entries, and target referencesThe output of lo build is plain Kubernetes YAML: kubectl apply -f clusters/<domain>/artifacts.yaml works against any cluster, with or without the rest of lok8s. With spec.build.artifacts: split the build also emits committable per-resource files under clusters/<domain>/artifacts/ (Secrets sops-encrypted) for GitOps consumers. See specs.
lok8s keeps two concerns strictly separate:
- Cluster creation: how the cluster comes to exist. A driver (
internal/driver/<kind>/) handles it. Thekind:of yourcluster.lok8s.yamlselects the driver. - Cluster content: what runs on it. Plain kustomize, split into two planes: ordered bootstrap infrastructure and independent workload targets.
Everything is keyed by FQDN. A cluster domain owns a cluster (cluster.lok8s.yaml); a deployment domain ships content to another domain's cluster (deploy.lok8s.yaml).
flowchart LR
spec["cluster.lok8s.yaml<br/>kind: Lo · KubeOne · Capi · Kkp"] --> drv{{driver}}
drv -->|provision| k8s[("Kubernetes cluster")]
k8s --> a["Plane A: bootstrap<br/>spec.bootstrap addons<br/>(CNI → LB → cert-manager …)"]
a --> b["Plane B: workloads<br/>targets/* · kustomize"]
b -->|"Tilt (dev) / lo deploy (CI)"| run(["running cluster"])
Concretely, lo up runs:
lo up # domain comes from `lo use` / --domain
├─ provision driver creates the cluster (kind / KubeOne / CAPI / KKP)
├─ bootstrap framework applies spec.bootstrap (CNI → MetalLB → cert-manager → …,
│ addons in order, waits healthy health-gated between stages)
└─ tilt up Tilt builds & live-reloads (or: lo build + lo deploy, headless)
The two content planes:
- Plane A: bootstrap (cluster infrastructure). An ordered
spec.bootstraplist of framework addons (CNI, load balancer, cert-manager, …) applied at provision time, with health waits between stages. The cluster is not "ready" until this finishes. - Plane B: workloads. User-named kustomize directories under
targets/, composed by the domain'skustomization.yamlinto oneclusters/<domain>/artifacts.yaml. There is no framework-level ordering: you express any ordering you need with Tilt'sresource_depsor your GitOps engine.
Drivers are pluggable cluster backends:
| Kind | Runtime | Use for |
|---|---|---|
Lo |
Docker + kind | Local dev / CI |
KubeOne |
KubeOne (Hetzner) | Self-managed production |
Capi |
Cluster API (Hetzner / CAPH today) | Declarative production provisioning |
Kkp |
Kubermatic KKP | Hosted control planes |
The drivers in this table share one spec format. (A fifth driver,
Kubehz, is for a kubehz Space.)Lo(local) needs nothing but Docker. The production drivers target Hetzner today but are optional: you can run lok8s entirely against clusters you provision yourself. Adding a driver for another backend is a documented extension point (see Extensibility).
For the full model (layer map, atoms/molecules, build/deploy pipeline), see ARCHITECTURE.md and the Concepts guide.
This single convention is what makes the "same workflow everywhere" promise hold. The framework (/.lok8s/) stays flat and framework-owned. Your content lives in a parallel clusters/ tree, one directory per cluster, named by its FQDN:
clusters/
├── lok8s.dev/ # local dev cluster (lo init cluster lok8s.dev)
│ ├── cluster.lok8s.yaml # the spec: kind, bootstrap, network, …
│ ├── targets/ # workload plane: one kustomize dir per target
│ │ ├── platform/
│ │ └── apps/
│ ├── artifacts/ # per-resource files of the build (lo build, spec.build.artifacts: split)
│ └── secrets/ # per-domain secret store (encrypted, opt-in)
├── cluster.example.in.net/ # production cluster (same structure!)
│ └── cluster.lok8s.yaml
└── api.example.com/ # deployment domain → deploys onto another cluster
└── deploy.lok8s.yaml
Why this matters:
- The folder name is the cluster's API hostname. Thus different environments can serve the same brand without collisions (
clusters/example.com/locally,clusters/cluster.example.in.net/in prod). - Secrets are per-domain (
clusters/<domain>/secrets/), so dev and prod can never accidentally cross-pollinate credentials. - A
Deploydomain carries no cluster of its own. ItclusterRefs another domain and ships workloads there. This is how one repo can target many clusters. - It is only folders and YAML: diff-able, reviewable, and obvious to a newcomer.
See ARCHITECTURE.md for the complete tree and Specs reference for every field.
The local experience is the part lok8s polishes hardest, because it is where you live day to day:
- One command, full loop.
lo upcreates akindcluster, applies yourspec.bootstrapinfrastructure, and starts Tilt. Tilt reads yourservices.yaml, builds images, wiresdocker_build+live_update, and gives you a UI at the URL it prints. The URL has a per-domain port from10351to10499, so parallel projects never collide. Edit code → Tilt syncs and reloads. (Local Dev guide) - Working TLS, no manual cert juggling. The
cert:generator of thesecrets.lok8s.devkustomize plugin mints leaf certificates from a shared local dev CA, with nomkcertdance per project.lo trustadds the CA to your system store, so browsers accept them. (Secrets guide, Kustomize plugins) - Fast, shared registry mirrors. All your lok8s projects can share one pull-through mirror network. Then each image is pulled once, not once per cluster. Opt in per project with
spec.registries.shared.enabled: true(off by default: the safer single-network topology). (Shared Registries guide) - Multi-project friendly. Use
*.[N].lok8s.devslots to run several local clusters on isolated Docker networks side by side.
Define services once, in a committed services.yaml. Put personal overrides in a gitignored services.<config>.yaml ("I'm not working on the frontend today" → enabled: false). Each buildable service carries a small lok8s.yaml describing its build, ports, and live-update rules. (Services guide)
Two honest paths to production:
- Provision with lok8s (Hetzner today). The
KubeOneandCapidrivers stand up real clusters on Hetzner Cloud (and bare metal via Hetzner Robot), with batteries-included networking, CNI, encryption-at-rest, and backups guidance. (CAPI · Bare Metal · Networking · Security · Backups) - Bring your own cluster.
lo buildrenders standardartifacts.yaml: plain manifests youkubectl applyto whatever cluster yourKUBECONFIGpoints at. EKS, GKE, a Raspberry Pi, a colleague's kind cluster: ifkubectlcan reach it, the output of lok8s runs on it. (lo deployautomates the apply against the kubeconfig it resolves for the domain.)
The optional operator (shell-operator-based) reconciles Lo and Capi CRDs on a management cluster. Its hooks are the same lo binary (lo operator <hook>), so cluster lifecycle can be declarative when you want it. (Operator guide)
The hosted, managed-platform layer (kubehz) is a separate product built on top of lok8s. lok8s works fully without it. No lock-in is a design goal, not a slogan.
lok8s treats AI as a built-in, local-first capability, not a cloud dependency.
lo chat: an on-device cluster assistant. Ask "why won't this deploy?" or "what's the LB IP?". It routes throughlotools, gathers facts, and streams a markdown answer in your terminal. It runs read-only by default, enforced in code (not by trusting the model). So it cannot change your cluster unless you switch posture with/posture open. Backends are local: Ollama or any OpenAI-compatible server (llama-server, llamafile, vLLM). Frontier CLIs (claude/gemini/codex) are strictly opt-in handoffs. Runlo chat --checkfor a guided setup. (Local AI guide)lo mcp: your CLI as agent tools. Almost every leaflocommand is an MCP tool (lo_status,lo_build,lo_deploy, …) over stdio. Thus agents like Claude Code or Cursor can drive lok8s the same way you do. Commands that print a credential, andlo chat, are never tools. Commands are tagged@readonly/@idempotent/@destructive, and a deterministic posture gate decides what an agent may actually run. A ready-to-use.mcp.jsonships in the repo root. It launchesbin/lo mcp startwith the full tool surface enabled (see below).lo ai: wire skills into your assistant. The repo ships curated skills (cluster specs, services, addons, secrets, the dev loop, troubleshooting…).lo ai link claudesymlinks them into.claude/skills/for native loading. Other agents get them by injection.lo ai checkreports the whole setup at a glance.
Try it in two commands:
lo chat --check # guided: checks the bridge + a local model, prints setup hints
lo chat # then ask, e.g. "why won't my deployment start?"If a piece needs setup, lo ai check / lo doctor tell you exactly what to run. (lo mcp is native to the binary. lo mcp claude|vscode|cursor enable writes the editor config. The bash variant, the argsh mcp builtin, starts as .lok8s/lo mcp from a checkout and wants argsh builtins install; see lo mcp.)
lok8s is conventions, not a cage. Every layer has a documented seam:
- Custom cluster drivers. The built-in drivers are Go packages under
internal/driver/. The bash driver contract is a file at.lok8s/drivers/<kind>/mainthat implementsdriver::provision,driver::destroy,driver::status,driver::kubeconfig(plus an optionaldriver::post_provision). The frozen implementation (alok8s.yamlthat routesprovisionto bash) andlo drivers <kind> …still honour it. The binary's own dispatch reads only the Go registry today. The Driver Contract reference includes a complete worked example (a k3s driver). - Your own addons. Drop a kustomize-buildable directory at
.lok8s/addons/<name>/(a khelmChartRenderer+ layeredvalues.<driver>.yaml/values.<provider>.yaml, or any plain kustomization) and reference it by name inspec.bootstrap. (Addons guide) - Adopt what you already have. Point a target's
kustomization.yamlat an existing kustomize base (resources: [ ../path/to/your/kustomization ]), or inflate an existing Helm chart via a khelmChartRenderer. No rewrite is required. - Add tools. The toolchain is managed by
b: add an entry to.bin/b.yaml, assign it a profile group,b install, and it's onPATH.
For most of its life the lo CLI was bash, built on argsh. It is now a single static Go binary (cmd/lo, internal/). The two facts below are both true on purpose:
- The binary orchestrates the same tools. It does not reimplement them. The job of lok8s is to drive
kubectl,kustomize,kind,clusterctl,kubeone, and friends. The Go code calls them as subprocesses through one seam, with the exact argv the bash used: no SDK drift, no version-matrix games. What lok8s runs is still what you'd run by hand, andlo --verbosestill prints it. Go buys a one-file install with a verified checksum, a hermetic unit-test suite, and one--help/MCP schema that cannot drift from the code. - The bash implementation is frozen, not deleted. It is embedded in the binary as the reference the binary was ported from, and
lo assets eject bashwrites it to.lok8s/in your project. The project'slok8s.yaml(spec.implementation) then routes the ported commands to it. In CI, ten differential parity harnesses diff the two implementations byte-for-byte, and ago testfails if the command trees drift. When something looks wrong, you can still read the library under.lok8s/libs/(after the eject),set -x, and step through it. If the bash is right and the binary is wrong, that is a bug we want reported. Full map, seams and the short list of deliberate differences: The Golobinary.
argsh is still in the toolchain: the Hetzner provider plugin and the frozen tree source its runtime. The bash is shellcheck-clean in CI (no new warnings allowed) alongside the Go lint. The kustomize plugins and the lo chat engine were Go from the start.
| Command | Description |
|---|---|
lo use [domain] |
Set / show the active domain |
lo up [--open-tilt] |
Provision cluster + bootstrap + start Tilt (--ci [--timeout <d>]: headless tilt ci, real exit status) |
lo down |
Stop Tilt + delete the cluster |
lo status |
Cluster health (the driver's status check) |
lo provision |
Provision cluster infra + apply spec.bootstrap addons (no Tilt, no targets/ deploy) |
lo build |
Render the domain kustomization → clusters/<domain>/artifacts.yaml |
lo deploy [-l k=v] |
Apply the domain artifact (CRDs → resources → health) |
lo lint |
Validate specs, bootstrap entries, target refs |
lo doctor |
Diagnose the local environment / toolchain |
lo addons [name...] [--detail] |
List / inspect framework bootstrap addons (--detail: the ones this cluster deploys, with category + configuration hints) |
lo kubeconfig |
Print the domain's kubeconfig (--oidc for the kubelogin exec-plugin) |
lo destroy |
Tear down a cluster |
lo clean [--all] |
Clean volumes; optionally prune Docker |
lo chat |
Local AI assistant (read-only by default) |
lo ai check|skills|link|unlink |
Manage AI skills + integration |
lo mcp |
Start the MCP tool server (stdio) |
lo tilt up|down|status|restart|ci|preflight |
Manage the Tilt environment (ci: headless build + deploy + wait; preflight: clear stuck-Terminating objects) |
lo registry up|down|status|clean |
Manage registry mirrors |
Most commands act on the active domain (set by lo use) or an explicit --domain <domain>. In this table only lo use [domain] and lo addons [name...] take a positional. lo build and lo deploy take none: both act on the whole domain kustomization (deploy narrows via -l key=value, not targets). Global flags: --verbose|-v, --force|-f, --force-recreate, --remote|-r, --cluster|-s, --kubernetes, --config, --domain, --domain-sans. Full reference: docs/reference/cli.md.
Full documentation lives at lok8s.io. Good entry points:
- Getting Started · Concepts · Architecture
- Workflows: Local Dev · Services · Secrets · Deploying · Local AI
- Production: CAPI · Bare Metal · Networking · Operator
- Reference: CLI · Specs · Driver Contract · Kustomize Plugins
npm run docs:dev # local docs site
npm run docs:build # build
Contributions are welcome. See CONTRIBUTING.md, the agent/contributor guide in AGENTS.md, and the test matrix in TESTING.md. In short: use conventional commits and keep CI green (go test ./... + the parity harnesses + npm run lint + npm test). Security is paramount: never pipe untrusted remote content into a shell, never commit secrets, validate external input.
lok8s is built on a few sibling tools and shares a philosophy with them:
b· binary.help: your one-stop binary manager. It installs and pins the toolchain of lok8s, and lok8s ships as abprofile.argsh· arg.sh: the framework the originalloCLI was built on. It is still the runtime of the frozen reference implementation and the provider plugins. It brings structure and maintainability to complex Bash (typed args, dispatch, generated--help).atty· atty.sh: a suckless-style PTY proxy (Zig). It puts an LLM exec dialog, atuin autosuggest, and guardrail confirmations between your terminal and your shell.