Quick Start
Minimal image
The following example demonstrates how to create a minimal image specification using the Image Builder API. This setup leverages the Container Object Storage Interface (COSI) for managing bucket credentials.
Note
You can use any of the object storage providers, that support S3 protocol and has COSI (v1alpha1) driver.
Example of such drivers are:
Example Configuration
apiVersion: image-builder.anza-labs.dev/v1alpha1
kind: Image
metadata:
name: minimal
spec:
format: 'kernel+initrd'
configuration: |
kernel:
image: linuxkit/kernel:6.6.13
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:e120ea2a30d906bd1ee1874973d6e4b1403b5ca3
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
- linuxkit/containerd:39301e7312f13eedf19bd5d5551af7b37001d435
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: getty
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
env:
- INSECURE=true
bucketCredentials:
name: s3-credentials
Applying the Configuration
Save the above configuration into a file named minimal-image.yaml
. You can then apply it using kubectl
:
Once applied, you can verify the status and access the generated secrets as follows:
To view the created secrets:
To retrieve the key and presigned URL from the secret:
$ kubectl get secrets minimal -o=json | jq -r '.data."<Output Name>"' | base64 -d
<Object Key> = <Presigned URL>
You can then use e.g. mc to fetch the objects: