This directory contains Kubernetes manifests for `Pod`, `Deployment` (with `Service`), `StatefulSet`, and `Job`.
*`Pod`: good for quick-start
*`Deployment` + `Service`: good for random load balancing with registry-side cache
*`StateFulset`: good for client-side load balancing, without registry-side cache
*`Job`: good if you don't want to have daemon pods
Using Rootless mode (`*.rootless.yaml`) is recommended because Rootless mode image is executed as non-root user (UID 1000) and doesn't need `securityContext.privileged`.
:warning: Rootless mode may not work on some host kernels. See [`../../docs/rootless.md`](../../docs/rootless.md).
See also ["Building Images Efficiently And Securely On Kubernetes With BuildKit" (KubeCon EU 2019)](https://kccnceu19.sched.com/event/MPX5).
If rootless mode doesn't work, try `pod.privileged.yaml`.
:warning: `kube-pod://` connection helper requires Kubernetes role that can access `pods/exec` resources. If `pods/exec` is not accessible, use `Service` instead (See below).
## `Deployment` + `Service`
Setting up mTLS is highly recommended.
`./create-certs.sh SAN [SAN...]` can be used for creating certificates.
```console
$ ./create-certs.sh 127.0.0.1
```
The daemon certificates is created as `Secret` manifest named `buildkit-daemon-certs`.