# k8s API reference

> The `k8s` package, from k8s 0.1.2, as published on mojoshelf (commit 6cb83ce08e02), by `mojo doc` from Mojo 1.2.0.

## Modules

- [k8s.client](https://magmalake.dev/s/k8s/api/client.md): The calls: create, get, delete, list and watch, for Pods, Services and Jobs in a namespace, and a pod's log.
- [k8s.config](https://magmalake.dev/s/k8s/api/config.md): Where the API server is and how to authenticate to it.
- [k8s.yaml](https://magmalake.dev/s/k8s/api/yaml.md): Just enough YAML to read a kubeconfig: block mappings and sequences of scalars, read into a flat map from paths to strings.

k8s: a small Kubernetes client for Mojo.

Create, get, delete, list and watch Pods, Services and Jobs, authenticated
in a pod with its service account or from a kubeconfig:

```mojo
from k8s import Client, Config, PODS

var k = Client(Config.load())
var pods = k.list(PODS, "orca.run=7")
```

See `k8s.client` for the calls and `k8s.config` for where credentials
come from.
