kata-containers/docs/how-to/how-to-use-virtio-fs-nydus-with-kata.md
luodaowen.backend 3175aad5ba virtiofs-nydus: add lazyload support for kata with clh
As kata with qemu has supported lazyload, so this pr aims to
bring lazyload ability to kata with clh.

Fixes #3654

Signed-off-by: luodaowen.backend <luodaowen.backend@bytedance.com>
2022-02-19 21:55:31 +08:00

1.4 KiB

Kata Containers with virtio-fs-nydus

Introduction

Refer to kata-nydus-design for introduction and nydus has supported Kata Containers with hypervisor QEMU and CLH currently.

How to

You can use Kata Containers with nydus as follows,

  1. Use nydus latest branch;

  2. Deploy nydus environment as Nydus Setup for Containerd Environment;

  3. Start nydus-snapshotter with enable_nydus_overlayfs enabled;

  4. Use kata-containers latest branch to compile and build kata-containers.img;

  5. Update configuration-qemu.toml or configuration-clh.tomlto include:

shared_fs = "virtio-fs-nydus"
virtio_fs_daemon = "<nydusd binary path>"
virtio_fs_extra_args = []
  1. run crictl run -r kata nydus-container.yaml nydus-sandbox.yaml;

The nydus-sandbox.yaml looks like below:

metadata:
  attempt: 1
  name: nydus-sandbox
  namespace: default
log_directory: /tmp
linux:
  security_context:
    namespace_options:
      network: 2
annotations:
  "io.containerd.osfeature": "nydus.remoteimage.v1"

The nydus-container.yaml looks like below:

metadata:
  name: nydus-container
image:
  image: localhost:5000/ubuntu-nydus:latest
command:
  - /bin/sleep
args:
  - 600
log_path: container.1.log