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 KernelPath example 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 yaml file I used to apply a custom kernel:

apiVersion: v1
kind: Pod
        com.github.containers.virtcontainers.KernelPath: "/usr/share/kata-containers/vmlinuz-4.19.31-40"
    name: kata-example
  runtimeClassName: kata-qemu

  - 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.