Skip to content

Quickstart

Terminal window
litek8s dev up
kubectl create deployment web --image=nginx
kubectl expose deployment web --type=NodePort --port 80
curl localhost:$(kubectl get svc web -o jsonpath='{.spec.ports[0].nodePort}')
litek8s ui # browse it all
export DOCKER_HOST=unix://$HOME/.litek8s/docker.sock
docker run --rm hello-world # the same cluster speaks the Docker API
litek8s dev up --name ci --nodes 3 # another cluster, three nodes
litek8s dev down # stop; objects and images are kept
litek8s dev delete # remove everything

Every cluster, and every node of a multi-node cluster, runs in one small VM on macOS or one rootless sandbox on Linux, started with the first cluster and stopped with the last. Each cluster gets its own API port, kubectl context and Docker socket:

Local dev clusters On your machine, kubectl, docker and litek8s ui talk to clusters that all run in one VM on macOS or one rootless sandbox on Linux. Cluster dev has one node, on 127.0.0.1:6443 with context litek8s-dev and its own docker.sock. Cluster ci has three nodes: nodes 2 and 3 join node 1, which runs the API server on its own port with context litek8s-ci. your machine kubectl · docker litek8s ui one VM (macOS) · one sandbox (Linux) cluster dev node API server · pods cluster ci 3 nodes node 1 API server node 2 node 3 join 127.0.0.1:6443 context litek8s-dev 127.0.0.1:<port> context litek8s-ci docker.sock

The Docker socket and the cluster share one image store, so an image you build is a pod’s image: right away:

Terminal window
export DOCKER_HOST=unix://$HOME/.litek8s/docker.sock
DOCKER_BUILDKIT=0 docker build -t myapp:dev . # litek8s's builder
kubectl create deployment myapp --image=myapp:dev

DOCKER_BUILDKIT=0 works with any docker CLI. To build with buildx (Docker Desktop and OrbStack install it) use docker build --load -t myapp:dev .: without --load buildx keeps the image in its own builder and the cluster never sees it. See Builds.