Repolode
Katakate

Katakate/k7

Self-hosted Kubernetes-based infrastructure that runs untrusted code in lightweight VM sandboxes, controlled via a CLI, HTTP API and Python SDK.

Open-source alternative to:AWS Fargate

Stars
821
Forks
26
Open issues
7
Last commit
yesterday

What is it?

k7 is a self-hosted system for creating, managing and orchestrating lightweight virtual machine sandboxes that execute untrusted code. It runs on Kubernetes and uses Kata Containers to wrap each sandbox in a VM, with Firecracker, QEMU and k7's own k7d microVM runtime available as backends. It was built primarily for AI agents that need to run arbitrary code at scale.

Users install it on Ubuntu nodes with an Ansible-based installer and pick a backend at install time. Sandboxes are created from a YAML config or the Python SDK, and can be run commands in, paused, resumed, snapshotted and forked. The k7d backend supports warm forks that copy both disk and memory state, while the QEMU path uses Longhorn for replicated, persistent disks. Docker builds and runs can be performed inside a sandbox with the --docker flag.

Sandboxes are network-isolated by default. Inter-sandbox traffic is blocked unless explicitly allowed, and egress can be restricted to CIDRs or, with Cilium, to domain names. Access is controlled through API keys with roles and optional tenants and quotas. The project is in beta and is described by its maintainers as still under security review.

Key features

  • 01Creates VM-isolated sandboxes on Kubernetes using Kata with Firecracker, QEMU or the k7d runtime.
  • 02Provides a CLI, an HTTP API and a sync/async Python SDK for managing sandboxes.
  • 03Supports pause, resume, snapshot and fork of sandboxes, with warm memory-and-disk forks on the k7d backend.
  • 04Blocks sandbox-to-sandbox traffic by default and allows per-sandbox egress allowlists, including domain names via Cilium.
  • 05Offers Docker build and run inside sandboxes via the --docker option.
  • 06Includes API keys with roles, tenants and quotas for multi-user access.

Use cases

  • Running code generated by AI agents in isolated environments.
  • Building a self-hosted serverless execution platform on your own servers.
  • Running CI/CD jobs that build containers without Docker-in-Docker on the host.
  • Forking a prepared sandbox state to run many parallel experiments.

Quick start

  1. 1

    Add the k7 PPA

    sudo add-apt-repository ppa:katakate.org/k7
  2. 2

    Install the k7 CLI

    sudo apt install k7
  3. 3

    Install Ansible for the installer

    sudo apt install -y ansible
  4. 4

    Install k7 on the node with a backend and API mode

    k7 install --backend kfd,kql,k7d --api-mode development

Things to know

  • k7 is in beta and under security review, so use caution for highly sensitive workloads.
  • Requires an Ubuntu host with hardware virtualization (KVM), which many cloud VPS plans do not expose.
  • The k7d backend supports only amd64/x86_64, and the .deb package is Linux-only.
  • The kfd backend needs a spare raw disk for the thin-pool.

Topics

FAQ

What is k7?
Self-hosted Kubernetes-based infrastructure that runs untrusted code in lightweight VM sandboxes, controlled via a CLI, HTTP API and Python SDK. k7 is a self-hosted system for creating, managing and orchestrating lightweight virtual machine sandboxes that execute untrusted code. It runs on Kubernetes and uses Kata Containers to wrap each sandbox in a VM, with Firecracker, QEMU and k7's own k7d microVM runtime available as backends. It was built primarily for AI agents that need to run arbitrary code at scale.
Is k7 free to use? What license does it have?
k7 is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is k7 still maintained?
Actively maintained. The last commit to k7 was on Oct 18, 2026.
What can I use k7 for?
Running code generated by AI agents in isolated environments. Building a self-hosted serverless execution platform on your own servers. Running CI/CD jobs that build containers without Docker-in-Docker on the host. Forking a prepared sandbox state to run many parallel experiments.
How do I install k7?
Add the k7 PPA: sudo add-apt-repository ppa:katakate.org/k7 Install the k7 CLI: sudo apt install k7 Install Ansible for the installer: sudo apt install -y ansible Install k7 on the node with a backend and API mode: k7 install --backend kfd,kql,k7d --api-mode development
Where can I get k7?
The source code and installation instructions are on GitHub: https://github.com/Katakate/k7

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects