Refer to kata-nydus
-design for introduction and nydus
has supported Kata Containers with hypervisor QEMU
and CLH
currently.
You can use Kata Containers with nydus
as follows,
-
Use
nydus
latest branch; -
Deploy
nydus
environment asNydus
Setup for Containerd Environment; -
Start
nydus-snapshotter
withenable_nydus_overlayfs
enabled; -
Use kata-containers
latest
branch to compile and buildkata-containers.img
; -
Update
configuration-qemu.toml
orconfiguration-clh.toml
to include:
shared_fs = "virtio-fs-nydus"
virtio_fs_daemon = "<nydusd binary path>"
virtio_fs_extra_args = []
- run
crictl run -r kata nydus-container.yaml nydus-sandbox.yaml
;
The nydus-sandbox.yaml
looks like below:
metadata:
attempt: 1
name: nydus-sandbox
uid: nydus-uid
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