# k8s

> k8s, a magmalake tin: A small Kubernetes client for Mojo: pods, jobs and services created, listed, watched and deleted, and pods' logs, in a pod with its service account or from a kubeconfig.

[magmalake](https://magmalake.dev/) [k8s](https://magmalake.dev/s/k8s)

A small Kubernetes client for Mojo: pods, jobs and services created, listed, watched and deleted, and pods' logs, in a pod with its service account or from a kubeconfig. It is what Orca uses to start a Dista cluster per run.

Install

mojoshelf:

```
pixi shelf add k8s-mojo
```

`pixi shelf` comes with mojoshelf: [install it first](https://mojoshelf.org/getting-started).

plain pixi:

```
pixi init app -c https://conda.modular.com/max -c conda-forge && cd app
sed -i.bak 's/^\[workspace\]/[workspace]\npreview = ["pixi-build"]/' pixi.toml
pixi add "mojo-compiler==1.2.0"
# Without mojoshelf: the tin as a git dependency at its published commit.
# Transitive dependencies may be wrong: pixi takes the tin's own git deps as
# pinned in its pixi.toml, which may not match what other tins pin, and then
# fails with "duplicate records". mojoshelf picks revisions that agree.
pixi add k8s-mojo --git https://github.com/magmalake/k8s.mojo --rev 6cb83ce08e02234873f2d09c7501208eedb5589f
```

No mojoshelf needed. If pixi reports duplicate records, the mojoshelf tab picks revisions that agree.

Version

`0.1.2` on mojoshelf

Source

[GitHub](https://github.com/magmalake/k8s.mojo) [README](https://github.com/magmalake/k8s.mojo#readme)

## Works today

- Manifests go in as JSON text; objects come back as json values, read with JSON pointers
- A kubeconfig's server, CA, client certificate and key, or a token
- An answer that isn't 2xx raises with the API's own message
- exec and auth-provider users (cloud CLIs) aren't supported: pass a token

Checked against Every call against a live kind cluster in CI

- [xml](https://magmalake.dev/s/xml) pull parser · path queries
- [lint](https://magmalake.dev/s/lint) mojolint · origin and threading mistakes
- [Every tin](https://magmalake.dev/tins)

[A magmalake project](https://magmalake.dev/)

Apache 2.0 · © 2026 Marius Seritan
