KiteGitHub
Quickstart

Deploy to your own servers

Run a Kite control plane on a Linux server of your own, join a host, and add a second server that takes over when the first stops.

On your own servers, the control plane runs as kite-control, one process under systemd. It keeps the cluster in a SQLite file on the server’s disk. kite deploy sets up one server, or one server and standbys that take over when it stops.

What you need

RequirementValueNote
Your machineMac or LinuxWith curl and kubectl
ServerLinux with systemd and glibc 2.28 or later, amd64 or arm64With curl, gzip and OpenSSL 3, and root login over SSH. Debian 12 and Ubuntu 22.04 or later include glibc and OpenSSL 3.
DNS nameSuch as kite.example.comResolves from your machine and from your hosts. Nodes connect to the control plane on port 443.
HostUbuntu 24.04 or Debian 13, amd64 or arm64With curl, at least 512 MiB of memory, and root login over SSH. It becomes a node. Manage nodes lists what other hosts need.
Second server, if you add oneA Postgres database, or an S3 or R2 bucketWith an access key that can read and write the bucket

Install the CLI

curl -fsSL https://get.runkite.io | sh

If the installer tells you to, add ~/.local/bin to your PATH.

Deploy the control plane

  1. Deploy to the server. kite deploy shows what it will create and asks before it changes anything:

    kite deploy --host root@kite.example.com

    It installs kite-control with the release’s installer and starts it. Then it writes a kubeconfig on your machine that trusts the cluster’s own certificate authority:

    ==> installing release 0.2850.0 on root@kite.example.com
    installed kite-control 0.2850.0 and restarted kite-control.service
    its settings are in /etc/kite/control.env, and journalctl -u kite-control shows its log
    sudo kite-control kubeconfig prints a kubeconfig for https://kite.example.com; --server <url> sets another address
        root@kite.example.com  serves
    ==> deployed
        api     https://kite.example.com
        kubectl export KUBECONFIG=/Users/you/.kite/deployments/kite-control/kubeconfig-break-glass
    
      join a host:        kite node add --deployment kite-control root@<host>
      teammates sign in:  not set up, so only the admin token works. Set KITE_OIDC_ISSUER in /Users/you/.kite/deployments/kite-control/deploy.env and deploy again.
      back up:            /Users/you/.kite/deployments/kite-control/deploy.env holds the only copy of the key to the cluster's Secrets

    Keep a copy of deploy.env somewhere safe: without it, nobody can read the cluster’s Secrets.

    By default, the cluster’s address is the host name of the SSH target, on port 443. To use another address, pass --address https://<name>:<port>.

  2. Check that the API responds:

    export KUBECONFIG=~/.kite/deployments/kite-control/kubeconfig-break-glass
    kubectl get nodes
    No resources found

Join a host

  1. Add the host. --deployment kite-control tells kite to use the cluster that you deployed, with its admin token and certificate authority. The command also copies the certificate authority to the host, where the node agent uses it:

    kite node add --deployment kite-control root@<host>
    joined wss://kite.example.com/connect as node-1
    bootstrapped node-1. Update this host with 'kite-agent update' from now on.
    kite-node-name=node-1
    waiting for node-1 to report Ready
    node-1
  2. Check the node:

    kubectl get nodes
    NAME     STATUS   ROLES    AGE   VERSION
    node-1   Ready    <none>   1s    v1.37.0+kite

Sign people in

With an OIDC provider in deploy.env, kite deploy prints the command that signs a person in:

  teammates sign in:  kite login https://kite.example.com --ca-hash sha256:72db8560…

Send it to the people who use the cluster. --ca-hash pins the cluster’s certificate authority, so they need no file from you. See Sign in to a cluster.

Run a workload

kubectl create deployment web --image=nginx:1.27-alpine --replicas=2
kubectl expose deployment web --port=80
kubectl rollout status deployment/web
kubectl get pods -o wide

Add a second server

The second server is a standby: it serves the cluster only when the first one stops. Both servers keep the cluster in a shared Postgres database, or in a copy in an S3 or R2 bucket that the serving server writes and the standby reads.

BackendSettingsTakeover after a crashAfter a clean stopWrites lost on a crashCost
PostgresKITE_DATABASE, KITE_DATABASE_PASSWORD15 to 20 seconds after the last renewalWithin 5 secondsNone that the server acknowledgedWhat the database costs
S3 or R2 bucketKITE_COPY and its access key30 to 40 seconds after the last renewalWithin about 10 secondsUp to the last second, or none with KITE_COPY_SYNC=1Per request: see Control plane costs

The serving server holds a lease in the database or the bucket, and renews it every 5 seconds in Postgres and every 10 seconds in a bucket.

Postgres

KITE_DATABASE=postgres://<user>@<host>/<database>
KITE_DATABASE_PASSWORD=<password>

S3

KITE_COPY=s3://<bucket>/kite-control
KITE_COPY_ACCESS_KEY_ID=<access key id>
KITE_COPY_SECRET_ACCESS_KEY=<secret access key>
KITE_COPY_REGION=us-east-1

R2

KITE_COPY=s3://<bucket>/kite-control
KITE_COPY_ACCESS_KEY_ID=<access key id>
KITE_COPY_SECRET_ACCESS_KEY=<secret access key>
KITE_COPY_REGION=auto
KITE_COPY_ENDPOINT_URL=https://<account id>.r2.cloudflarestorage.com
  1. Add the settings for your database or bucket, from the tabs above, to ~/.kite/deployments/kite-control/deploy.env.

  2. Deploy again:

    kite deploy

    With KITE_DATABASE, the first server moves the cluster from its disk into the database. The database must be empty. With KITE_COPY, the first server starts to copy the cluster to the bucket.

  3. Add the second server:

    kite deploy --host root@kite-2.example.com
    ==> installing release 0.2850.0 on root@kite-2.example.com
        root@kite-2.example.com  stands by
  4. Point kite.example.com at a TCP load balancer in front of both servers, with TLS passed through and a health check on port 443.

With a bucket, the serving server acknowledges a write once the write is on its disk, and uploads it within about a second. The standby applies each segment of writes as it is uploaded, and applies the rest before it serves. With KITE_COPY_SYNC=1, the server acknowledges a write only after the write is in the bucket.

Upgrade

kite deploy upgrades every server: the standby first, and the serving server last. It does not restart a server that already runs the release with the same settings, so adding a server does not restart the serving one. kite deploy wait shows which server is serving.

Move a cluster from a Worker

A Worker’s cluster comes to your server through the Worker’s copy in a bucket. Move a cluster has the steps.

Install with curl

kite deploy runs the release’s installer on the server over SSH. To run it on the server yourself instead:

  1. On the server, install the control plane. Set KITE_ADDRESS to the address that your machine and your hosts use to connect to it:

    curl -fsSL https://get.runkite.io/control | KITE_ADDRESS=https://kite.example.com sh
    installed kite-control 0.2832.0 and restarted kite-control.service
    its settings are in /etc/kite/control.env, and journalctl -u kite-control shows its log
    sudo kite-control kubeconfig prints a kubeconfig for https://kite.example.com; --server <url> sets another address

    The installer writes new secrets to /etc/kite/control.env. kite-control listens on the port in the address, 443 by default, with a certificate for the host name in the address. Without KITE_ADDRESS, it listens on 443 with a certificate for the server’s host name.

  2. On your machine, save the control plane’s kubeconfig and check that the API responds:

    ssh root@kite.example.com kite-control kubeconfig > kite.yaml
    kubectl --kubeconfig kite.yaml get nodes
    No resources found
  3. Join a host with the same file:

    kite node add --kubeconfig kite.yaml root@<host>
    joined wss://kite.example.com/connect as node-1
    bootstrapped node-1. Update this host with 'kite-agent update' from now on.
    kite-node-name=node-1
    waiting for node-1 to report Ready
    node-1

kite.yaml contains the admin token. Keep it private, as you would ~/.kite/deployments.

If something goes wrong

What you seeWhat to do
<program> listens on port 443 on <host>Stop that program on the server, or pass --address https://<name>:<port> with a free port. Nothing was changed.
install OpenSSL 3 or Node.js to check the signatureInstall OpenSSL 3 on the server, then deploy again.
kite-control needs glibc 2.28 or laterUse a server with a distribution that ships glibc 2.28 or later, such as Debian 12 or Ubuntu 22.04.
kite-control neither serves nor stands byOn the server, run journalctl -u kite-control.
a second host needs KITE_DATABASE or KITE_COPYAdd the database or the bucket to deploy.env, as in Add a second server.
The node isn’t ReadyOn the host, run kite-agent status, then kite-agent logs.

Next

  • Manage nodes: add, upgrade, and remove hosts.
  • CLI reference: every setting of a deployment on your own servers.
  • How it works: how the control plane stores and copies a cluster. The control plane can also run as a Raft group of 3 or 5 servers, but kite deploy does not set one up.
  • Move a cluster: move a cluster between a Worker and your own servers.