mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-18 06:44:23 +01:00
Pulling image is the most time-consuming step in the container lifecycle. This PR introduse nydus to kata container, it can lazily pull image when container start. So it can speed up kata container create and start. Fixes #2724 Signed-off-by: luodaowen.backend <luodaowen.backend@bytedance.com>
1.3 KiB
1.3 KiB
Kata Containers with virtio-fs-nydus
Introduction
Refer to kata-nydus-design
How to
You can use Kata Containers with nydus as follows,
-
Use
nyduslatest branch; -
Deploy
nydusenvironment asNydusSetup for Containerd Environment; -
Start
nydus-snapshotterwithenable_nydus_overlayfsenabled; -
Use kata-containers
latestbranch to compile and buildkata-containers.img; -
Update
configuration-qemu.tomlto include:
shared_fs = "virtio-fs-nydus"
virtio_fs_daemon = "<nydusd binary path>"
virtio_fs_extra_args = []
- run
crictl run -r kata-qemu 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