Kata annotations
Annotations are a great feature in Kubernetes and a means for communicating to kata some options. They are being documented as of the time of this writing
Using annotations, you can:
- Customize the Kernel that is used (see
KernelPathexample below) - Change the guest image (
ImagePath) - Hypervisor (
HypervisorPath) - Firmware (
FirmwarePath) - etc. etc. (All of the annotations are listed in
annotations.go)Using a Custom Kernel
Here is the
yamlfile I used to apply a custom kernel:
apiVersion: v1
kind: Pod
metadata:
annotations:
com.github.containers.virtcontainers.KernelPath: "/usr/share/kata-containers/vmlinuz-4.19.31-40"
name: kata-example
spec:
runtimeClassName: kata-qemu
containers:
- name: nginx-container
image: nginx
The metadata key contains the annotations map. All of the annotations are listed in annotations.go on the main repo.