# k7

Point Sandcovery at the HTTPS origin and API key of your own k7 cluster so it can run sandboxes there.

Sandcovery runs each sandbox as a k7 sandbox on your own cluster, through the REST API in [k7's sandbox endpoints](https://docs.katakate.org/k7/api/endpoints/sandboxes). Sandcovery built this support from k7's documentation alone, with no k7 cluster of its own, so your first sandbox on k7 is also the first run of this support against k7 itself.

## What runs

| Option | Support |
| --- | --- |
| Size | `1x2`, `2x4`, `4x8`, and `8x16` |
| Egress | `allow_all`, `deny_all`, and an allowlist of CIDRs, or of host names on a Cilium cluster |
| Lifetime | Until the sandbox's TTL. k7 has no TTL of its own |
| Pause and resume | Yes |
| Image | Any public image on k7's registry allowlist, default `ubuntu:24.04` |
| Environment variables | Set on each command, not at create |
| Port previews | No. k7 publishes inbound ports only as cluster NodePorts |

Snapshots, disk sizes, GPUs, idle timeouts, a region, inbound port previews, sandbox-wide environment values at create, and output streamed while a command runs are not available on this provider. A streamed command answers its output when it ends. Files go through commands, under `/root` unless the path is absolute.

## Install k7 with a public hostname

Install k7 on your cluster with `k7 install --api-hostname <host>` as the [installation guide](https://docs.katakate.org/k7/getting-started/installation) describes, so the API serves a publicly trusted certificate on port 31007. Sandcovery sends the API key only to that origin, such as `https://k7.example.com:31007`.

## Make the API key

Create a `user` key with `k7 generate-api-key <name> --role user` whose tenant owns the `default` namespace, since Sandcovery runs every sandbox there, as [k7's identity endpoints](https://docs.katakate.org/k7/api/endpoints/identity) describe.

## Add the credential

Add the HTTPS origin and the API key as the k7 credential in **Provider Credentials** in the [dashboard](/app/credentials). Delete the key in k7 when you remove the credential.
