mirror of
https://github.com/clearlinux/clear-linux-documentation.git
synced 2026-04-28 19:13:46 +00:00
253 lines
13 KiB
HTML
253 lines
13 KiB
HTML
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en" data-content_root="../">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<title>Kata Containers* — Documentation for Clear Linux* project</title>
|
|
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
|
|
<link rel="stylesheet" type="text/css" href="../_static/bizstyle.css?v=5283bb3d" />
|
|
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
|
|
|
|
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
|
|
<script src="../_static/doctools.js?v=9bcbadda"></script>
|
|
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
|
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
|
|
<script src="../_static/copybutton.js?v=a56c686a"></script>
|
|
<script src="../_static/bizstyle.js"></script>
|
|
<link rel="canonical" href="https://clearlinux.github.io/clear-linux-documentation/tutorials/kata.html" />
|
|
<link rel="icon" href="../_static/favicon.ico"/>
|
|
<link rel="author" title="About these documents" href="../about.html" />
|
|
<link rel="index" title="Index" href="../genindex.html" />
|
|
<link rel="search" title="Search" href="../search.html" />
|
|
<link rel="next" title="Kubernetes*" href="kubernetes.html" />
|
|
<link rel="prev" title="HPC Cluster" href="hpc.html" />
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
<!--[if lt IE 9]>
|
|
<script src="_static/css3-mediaqueries.js"></script>
|
|
<![endif]-->
|
|
</head><body>
|
|
<div class="related" role="navigation" aria-label="Related">
|
|
<h3>Navigation</h3>
|
|
<ul>
|
|
<li class="right" style="margin-right: 10px">
|
|
<a href="../genindex.html" title="General Index"
|
|
accesskey="I">index</a></li>
|
|
<li class="right" >
|
|
<a href="kubernetes.html" title="Kubernetes*"
|
|
accesskey="N">next</a> |</li>
|
|
<li class="right" >
|
|
<a href="hpc.html" title="HPC Cluster"
|
|
accesskey="P">previous</a> |</li>
|
|
<li class="nav-item nav-item-0"><a href="../index.html">Documentation for Clear Linux* project</a> »</li>
|
|
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Tutorials</a> »</li>
|
|
<li class="nav-item nav-item-this"><a href="">Kata Containers*</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="document">
|
|
<div class="documentwrapper">
|
|
<div class="bodywrapper">
|
|
<div class="body" role="main">
|
|
|
|
<blockquote>
|
|
<div></div></blockquote>
|
|
<section id="kata-containers">
|
|
<span id="kata"></span><h1>Kata Containers*<a class="headerlink" href="#kata-containers" title="Link to this heading">¶</a></h1>
|
|
<p>This tutorial describes how to install, configure, and run <a class="reference external" href="https://katacontainers.io/">Kata Containers</a>
|
|
on Clear Linux* OS.</p>
|
|
<nav class="contents local" id="contents">
|
|
<ul class="simple">
|
|
<li><p><a class="reference internal" href="#description" id="id2">Description</a></p></li>
|
|
<li><p><a class="reference internal" href="#prerequisites" id="id3">Prerequisites</a></p></li>
|
|
<li><p><a class="reference internal" href="#install-kata-containers" id="id4">Install Kata Containers</a></p></li>
|
|
<li><p><a class="reference internal" href="#run-kata-containers" id="id5">Run Kata Containers</a></p></li>
|
|
</ul>
|
|
</nav>
|
|
<section id="description">
|
|
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Description</a><a class="headerlink" href="#description" title="Link to this heading">¶</a></h2>
|
|
<p>Kata Containers is an open source project developing a lightweight
|
|
implementation of <abbr title="Virtual Machines">VMs</abbr> that offer the speed of
|
|
containers and the security of VMs.</p>
|
|
</section>
|
|
<section id="prerequisites">
|
|
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Prerequisites</a><a class="headerlink" href="#prerequisites" title="Link to this heading">¶</a></h2>
|
|
<p>This tutorial assumes you have installed Clear Linux OS on your host system.
|
|
For detailed instructions on installing Clear Linux OS on a bare metal system, follow
|
|
the <a class="reference internal" href="../get-started/bare-metal-install-desktop.html#bare-metal-install-desktop"><span class="std std-ref">bare metal installation tutorial</span></a>.</p>
|
|
<p>If you have Clear Containers installed on your Clear Linux OS system, then follow the
|
|
<a class="reference internal" href="archive/kata_migration.html#kata-migration"><span class="std std-ref">migrate Clear Containers to Kata Containers tutorial</span></a>.</p>
|
|
<p>Update Clear Linux OS with the following command:</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>swupd<span class="w"> </span>update
|
|
</pre></div>
|
|
</div>
|
|
</section>
|
|
<section id="install-kata-containers">
|
|
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Install Kata Containers</a><a class="headerlink" href="#install-kata-containers" title="Link to this heading">¶</a></h2>
|
|
<p>Kata Containers is included in the <code class="file docutils literal notranslate"><span class="pre">containers-virt</span></code> bundle.
|
|
To install the framework:</p>
|
|
<ol class="arabic">
|
|
<li><p>Install the containers-virt bundle:</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>swupd<span class="w"> </span>bundle-add<span class="w"> </span>containers-virt
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
<li><p>Reload and restart the Docker* systemd service.</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>systemctl<span class="w"> </span>daemon-reload
|
|
sudo<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>docker
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
</ol>
|
|
</section>
|
|
<section id="run-kata-containers">
|
|
<h2><a class="toc-backref" href="#id5" role="doc-backlink">Run Kata Containers</a><a class="headerlink" href="#run-kata-containers" title="Link to this heading">¶</a></h2>
|
|
<p>To use kata as the runtime for an individual container, add
|
|
<strong class="command">--runtime=kata-runtime</strong> to the <strong class="command">docker run</strong> command. For
|
|
example:</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>docker<span class="w"> </span>run<span class="w"> </span>--runtime<span class="o">=</span>kata-runtime<span class="w"> </span>-ti<span class="w"> </span>busybox<span class="w"> </span>sh
|
|
</pre></div>
|
|
</div>
|
|
<p>To use kata as the default runtime for all Docker containers:</p>
|
|
<ol class="arabic">
|
|
<li><p>Set the default runtime for the Docker daemon:</p>
|
|
<div class="admonition note">
|
|
<p class="admonition-title">Note</p>
|
|
<p>The method below uses a systemd drop-in configuration to add a
|
|
command-line (CLI) parameter to the Docker daemon for setting the
|
|
<em>default-runtime</em>. Alternatively, the default runtime can be set in the
|
|
<a class="reference external" href="https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file">Docker daemon configuration file</a>.
|
|
The Docker daemon will not start if the <em>default-runtime</em> configuration
|
|
in set multiple locations.</p>
|
|
</div>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>mkdir<span class="w"> </span>-p<span class="w"> </span>/etc/systemd/system/docker.service.d/
|
|
|
|
cat<span class="w"> </span><span class="s"><<EOF | sudo tee /etc/systemd/system/docker.service.d/50-runtime.conf</span>
|
|
<span class="s">[Service]</span>
|
|
<span class="s">Environment="DOCKER_DEFAULT_RUNTIME=--default-runtime kata-runtime"</span>
|
|
<span class="s">EOF</span>
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
<li><p>Reload and restart the Docker* systemd service.</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>systemctl<span class="w"> </span>daemon-reload
|
|
sudo<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>docker
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
<li><p>Verify the default runtime reported by docker is <strong>kata-runtime</strong>.</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>docker<span class="w"> </span>info<span class="w"> </span><span class="p">|</span><span class="w"> </span>grep<span class="w"> </span><span class="s2">"Default Runtime"</span>
|
|
<span class="w"> </span>Default<span class="w"> </span>Runtime:<span class="w"> </span>kata-runtime
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
</ol>
|
|
<section id="troubleshooting">
|
|
<h3>Troubleshooting<a class="headerlink" href="#troubleshooting" title="Link to this heading">¶</a></h3>
|
|
<ul>
|
|
<li><p>If you are behind a HTTP proxy server, in a corporate setting for
|
|
example, please refer to the <a class="reference external" href="https://docs.docker.com/config/daemon/systemd/#httphttps-proxy">Docker proxy instructions</a>.</p></li>
|
|
<li><p>To change the Docker storage driver, see
|
|
<a class="reference internal" href="docker.html#additional-docker-configuration"><span class="std std-ref">Additional Docker configuration</span></a>.</p></li>
|
|
<li><p>To check the version of Clear Linux OS on your system, enter: <strong class="command">sudo swupd
|
|
info</strong>.</p></li>
|
|
<li><p>Clear Linux OS versions before 27000 require manually configure Docker* to use Kata
|
|
Containers as shown in this tutorial.</p></li>
|
|
<li><p>Clear Linux OS versions between 27000 and 31930 had a mechanism to automatically set
|
|
kata as the default runtime for docker. To disable this mechanism run the
|
|
commands below:</p>
|
|
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>systemctl<span class="w"> </span>mask<span class="w"> </span>docker-set-runtime.service
|
|
sudo<span class="w"> </span>rm<span class="w"> </span>/etc/systemd/system/docker.service.d/50-runtime.conf
|
|
sudo<span class="w"> </span>systemctl<span class="w"> </span>daemon-reload
|
|
sudo<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>docker.service
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
<div class="clearer"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
|
<div class="sphinxsidebarwrapper">
|
|
<p class="logo"><a href="../index.html">
|
|
<img class="logo" src="../_static/clearlinux.png" alt="Logo of Clear Linux* Project Docs"/>
|
|
</a></p>
|
|
<div>
|
|
<h3><a href="../index.html">Table of Contents</a></h3>
|
|
<ul>
|
|
<li><a class="reference internal" href="#">Kata Containers*</a><ul>
|
|
<li><a class="reference internal" href="#description">Description</a></li>
|
|
<li><a class="reference internal" href="#prerequisites">Prerequisites</a></li>
|
|
<li><a class="reference internal" href="#install-kata-containers">Install Kata Containers</a></li>
|
|
<li><a class="reference internal" href="#run-kata-containers">Run Kata Containers</a><ul>
|
|
<li><a class="reference internal" href="#troubleshooting">Troubleshooting</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
<div>
|
|
<h4>Previous topic</h4>
|
|
<p class="topless"><a href="hpc.html"
|
|
title="previous chapter">HPC Cluster</a></p>
|
|
</div>
|
|
<div>
|
|
<h4>Next topic</h4>
|
|
<p class="topless"><a href="kubernetes.html"
|
|
title="next chapter">Kubernetes*</a></p>
|
|
</div>
|
|
<div role="note" aria-label="source link">
|
|
<h3>This Page</h3>
|
|
<ul class="this-page-menu">
|
|
<li><a href="../_sources/tutorials/kata.rst.txt"
|
|
rel="nofollow">Show Source</a></li>
|
|
</ul>
|
|
</div>
|
|
<search id="searchbox" style="display: none" role="search">
|
|
<h3 id="searchlabel">Quick search</h3>
|
|
<div class="searchformwrapper">
|
|
<form class="search" action="../search.html" method="get">
|
|
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
|
<input type="submit" value="Go" />
|
|
</form>
|
|
</div>
|
|
</search>
|
|
<script>document.getElementById('searchbox').style.display = "block"</script>
|
|
</div>
|
|
</div>
|
|
<div class="clearer"></div>
|
|
</div>
|
|
<div class="related" role="navigation" aria-label="Related">
|
|
<h3>Navigation</h3>
|
|
<ul>
|
|
<li class="right" style="margin-right: 10px">
|
|
<a href="../genindex.html" title="General Index"
|
|
>index</a></li>
|
|
<li class="right" >
|
|
<a href="kubernetes.html" title="Kubernetes*"
|
|
>next</a> |</li>
|
|
<li class="right" >
|
|
<a href="hpc.html" title="HPC Cluster"
|
|
>previous</a> |</li>
|
|
<li class="nav-item nav-item-0"><a href="../index.html">Documentation for Clear Linux* project</a> »</li>
|
|
<li class="nav-item nav-item-1"><a href="index.html" >Tutorials</a> »</li>
|
|
<li class="nav-item nav-item-this"><a href="">Kata Containers*</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="footer" role="contentinfo">
|
|
© Copyright 2022 Intel Corporation. All Rights Reserved..
|
|
Last updated on Nov 04, 2024.
|
|
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.
|
|
</div>
|
|
</body>
|
|
</html> |