「Kata Containers」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(英語版より転載)
 
 
(同じ利用者による、間の4版が非表示)
1行目: 1行目:
[[Category:Sandboxing]]
+
[[Category:サンドボックス]]
[[Category:Security]]
+
[[Category:セキュリティ]]
[[Category:Virtualization]]
+
[[Category:仮想化]]
  +
[[en:Kata Containers]]
 
{{Related articles start}}
 
{{Related articles start}}
 
{{Related|Docker}}
 
{{Related|Docker}}
 
{{Related|Podman}}
 
{{Related|Podman}}
 
{{Related articles end}}
 
{{Related articles end}}
  +
Kata Containers(以前の Clear Containers)は、OCI 互換のアプリケーションコンテナランタイムで、仮想化を利用して、潜在的に信頼できないプロセスを、ホストシステムや他のプロセスから隔離することを目的としています。現在、アップストリームでサポートされているハイパーバイザーは、{{pkg|qemu}}、{{aur|firecracker-bin}} と {{aur|cloud-hypervisor}} です。
Kata Containers (previously Clear Containers) is an OCI-compatible application container runtime meant to provide isolation of potentially untrusted processes from the host system and other processes by leveraging virtualization. Currently upstream-supported hypervisors are {{pkg|qemu}}, {{aur|firecracker-bin}} and {{aur|cloud-hypervisor}}.
 
   
 
== Architecture ==
 
== Architecture ==
18行目: 19行目:
 
* {{ic|kata-containers-image}} - initramfs and rootfs images used for spawning VM sandboxes
 
* {{ic|kata-containers-image}} - initramfs and rootfs images used for spawning VM sandboxes
   
== Usage ==
+
== 使用方法 ==
   
Kata, by default, picks up its configuration from {{ic|/etc/kata-containers/configuration.toml}}, but that can be overridden by providing a path to configuration through the {{ic|KATA_CONF_FILE}} environment variable. Be sure to initialize configuration from {{ic|/usr/share/defaults/kata-containers/configuration-qemu.toml}}.
+
Kata はデフォルトでは {{ic|/etc/kata-containers/configuration.toml}} から設定を拾いますが、環境変数 {{ic|KATA_CONF_FILE}} で設定のパスを指定することで、これをオーバーライドすることができます。必ず {{ic|/usr/share/defaults/kata-containers/configuration-qemu.toml}} からの設定を初期化してください。
   
 
=== v1 ===
 
=== v1 ===

2021年5月19日 (水) 14:18時点における最新版

関連記事

Kata Containers(以前の Clear Containers)は、OCI 互換のアプリケーションコンテナランタイムで、仮想化を利用して、潜在的に信頼できないプロセスを、ホストシステムや他のプロセスから隔離することを目的としています。現在、アップストリームでサポートされているハイパーバイザーは、qemufirecracker-binAURcloud-hypervisorAUR です。

Architecture

  • kata-agent - supervisor process running on the hypervised guest sandbox, tasked with managing its lifetime
  • kata-runtime - container runtime component responsible for handling commands specified by the OCI runtime specification and tasked with launching shims
  • kata-proxy (before 2.0) - routes I/O streams and signals between on-guest agent and host-side processes associated with running a given sandbox using gRPC
  • kata-shim (before 2.0) - container process monitor and reaper
  • kata-ksm-throttler (optional, before 2.0) -
  • kata-linux-container - patched kernel used to launch VMs serving as container/pod sandboxes
  • kata-containers-image - initramfs and rootfs images used for spawning VM sandboxes

使用方法

Kata はデフォルトでは /etc/kata-containers/configuration.toml から設定を拾いますが、環境変数 KATA_CONF_FILE で設定のパスを指定することで、これをオーバーライドすることができます。必ず /usr/share/defaults/kata-containers/configuration-qemu.toml からの設定を初期化してください。

v1

Install the runtime kata-runtime-binAUR, kata-proxy-binAUR[リンク切れ: package not found], kata-shim-binAUR[リンク切れ: package not found], kernel kata-linux-container-binAUR and set of initrd and rootfs kata-containers-image-binAUR.

Docker

In order to use Kata Containers with Docker, the user needs to add it to supported runtimes in /etc/docker/daemon.json:

 {
   "runtimes": {
     "kata": {
       "path": "/usr/bin/kata-runtime"
     }
   }
 }

To use it as the default runtime for Docker: {"default-runtime": "kata"} .

To use it with the Firecracker hypervisor, due to its limitations, the devicemapper storage driver [1] has to be used: {"storage-driver": "devicemapper"} .

Afterward you can use the runtime key: docker run --runtime kata --rm -ti archlinux/base /bin/bash.

Podman

Running a container: podman --runtime /usr/bin/kata-runtime run --rm -ti archlinux/base /bin/bash.

Keep in mind that a Kata VM sandbox conceptually maps to Kubernetes pods or a shared netns, not just individual containers.

v2

Since release 2.0, Kata Containers exclusively uses OCI runtime shim API v2, however Docker has that API version hard-coded to v1, making it unfeasible to use this combination as of this writing.

Install the runtime kata2-runtime-binAUR, kernel kata2-linux-container-binAUR and set of initrd and rootfs kata2-containers-image-binAUR.

Containerd CLI

# ctr image pull docker.io/archlinux/base:latest
# ctr run --rm -t --runtime io.containerd.kata.v2 docker.io/archlinux/base:latest example-container-name date

See also