The legacy daemon (litek8s serve)
litek8s started as a small Docker-backed orchestrator: one local daemon over
a Unix socket, a strict reduced Deployment manifest
(apiVersion: litek8s.dev/v1alpha1), SSH-backed remote nodes and a
reconciler that recreates containers if they disappear. It still ships in
the binary (litek8s serve, apply, get, top, tree, …), but the
project’s core is now the Kubernetes API server (litek8s apiserver,
litek8s dev); new work goes there. A guided walkthrough is in
legacy-daemon-demo.md.
Commands
Section titled “Commands”cargo run -- servecargo run -- apply -f examples/nginx.yamlcargo run -- apply -f examples/http-echo-service.yamlcargo run -- get deploymentscargo run -- describe deployment demo-nginxcargo run -- logs demo-nginxcargo run -- proxy echo-democargo run -- service add echo-svc --deployment echo-demo --listen 127.0.0.1:9100cargo run -- get servicescargo run -- eventscargo run -- events --deployment demo-nginxcargo run -- events --node server77 --watchcargo run -- topcargo run -- top --watchcargo run -- treecargo run -- tree --watchcargo run -- node cordon server77cargo run -- node uncordon server77cargo run -- delete deployment demo-nginxtop shows a daemon summary first, then the managed deployments table.
events shows the control-plane history: scheduling, starts, backoff, deletes, and node registration.
events can also filter by deployment or node so noisy workloads do not drown the rest of the stream.
proxy opens a local TCP listener and forwards into the deployment’s published hostPort, using SSH tunneling automatically when the workload is on a remote node.
service add creates a daemon-managed local listener with a stable address, so you do not need to keep a foreground proxy process open.
The same service can also be declared as YAML with a small selector-based Service manifest and applied with litek8s apply -f ....
tree gives you a real relationship view from the control plane down to nodes, deployments, published ports, and services, so you do not have to reconstruct topology mentally from separate tables.
Firepack
Section titled “Firepack”If you want a busier demo, these examples are designed to run together:
examples/nginx.yaml: small web server onlocalhost:8089examples/http-echo.yaml: tiny HTTP responder onlocalhost:8090examples/cpu-burn.yaml: synthetic CPU pressureexamples/logstorm.yaml: noisy container forlogsexamples/oom-demo.yaml: intentional crash loop to exercise backoff
cargo run -- apply -f examples/nginx.yamlcargo run -- apply -f examples/http-echo.yamlcargo run -- apply -f examples/cpu-burn.yamlcargo run -- apply -f examples/logstorm.yamlcargo run -- apply -f examples/oom-demo.yaml
target/debug/litek8s top --watch --interval-secs 1target/debug/litek8s tree --watch --interval-secs 1target/debug/litek8s logs logstorm --tail 20target/debug/litek8s describe deployment oom-demotarget/debug/litek8s proxy echo-demo --listen 127.0.0.1:9000target/debug/litek8s apply -f examples/http-echo-service.yamltarget/debug/litek8s apply -f examples/http-echo-edge-service.yamlTo clean up:
cargo run -- delete deployment demo-nginxcargo run -- delete deployment echo-democargo run -- delete deployment cpu-burncargo run -- delete deployment logstormcargo run -- delete deployment oom-demoRemote node demo
Section titled “Remote node demo”litek8s can also place a deployment on another machine over ssh. The simplest path is node add --install, which detects the remote platform, builds a compatible binary, copies it over SSH, and registers the node.
- Register the node in the local control plane:
cargo run -- node add server77 --ssh server77 --install --label role=edge --label zone=labcargo run -- get nodescargo run -- node cordon server77cargo run -- node uncordon server77If you already copied the correct binary manually, --install is optional.
- Apply manifests that target that node:
cargo run -- apply -f examples/http-echo-server77.yamlcargo run -- apply -f examples/http-echo-edge.yamlcargo run -- apply -f examples/http-echo-edge-service.yamlcargo run -- get deploymentscargo run -- describe deployment echo-server77cargo run -- describe deployment echo-edgecargo run -- get servicescargo run -- describe service edge-svccargo run -- tree --watchcargo run -- events --node server77 --watchcargo run -- events --deployment echo-edgecargo run -- proxy echo-edge --listen 127.0.0.1:9002cargo run -- top --watchThe remote examples cover both scheduling paths:
examples/http-echo-server77.yamlusesspec.template.spec.nodeName: server77examples/http-echo-edge.yamlusesspec.template.spec.nodeSelector.role=edge
get / describe / top now show a NODE column so you can see where each deployment is running, and events lets you watch the scheduler and reconciler decisions in real time.
get nodes and describe node also show whether a node is Schedulable or Cordoned, which makes it easy to demo controlled placement.
tree is the quickest way to show the actual cluster shape: which deployment lives on which node, and which service currently points at which deployment.
proxy is useful when the remote node is only reachable over SSH or when you want one stable local URL during the demo.
service is the next step up: the daemon owns the listener, keeps it alive across CLI exits, and forwards each connection to the deployment’s current node and published port.
The declarative subset is intentionally small: kind: Service, spec.selector, and one TCP entry in spec.ports. The daemon resolves the selector to exactly one deployment in v1; built-in load balancing is not implemented yet. The older deploymentName + listenAddr + targetPort shape still works for compatibility.
Manifest shape
Section titled “Manifest shape”The supported manifest is deliberately narrow:
apiVersion: litek8s.dev/v1alpha1kind: Deploymentspec.replicas: 1- exactly one container
restartPolicy: Always- optional
nodeNameandnodeSelectorinspec.template.spec - optional
metadata.labelsfor service selection - optional
command,args,env,ports, andresources.limits - supported limits are
cpuandmemorywith k8s-style strings such as500mand128Mi
The supported Service subset is also deliberately narrow:
apiVersion: litek8s.dev/v1alpha1kind: Servicespec.selectormust match exactly one deploymentspec.portsmust contain exactly one TCP portspec.ports[0].portbecomes the local listener port on127.0.0.1- optional
spec.ports[0].targetPortoverrides the deployment’s published container port
- The daemon uses the local Docker socket directly and supports Linux plus macOS setups such as OrbStack and Docker Desktop.
- Remote nodes are reached over
sshand execute the samelitek8sagent binary against their local Docker daemon. - No overlay networking, kube-proxy, load balancing, volumes, secrets, or rollouts are included in v1.