Skip to content

Latest commit

 

History

History
191 lines (137 loc) · 6.61 KB

README.md

File metadata and controls

191 lines (137 loc) · 6.61 KB

Utilities

Kata Manager

Notes:

Permissions

The permissions of certain Kata binaries are currently overly restrictive. To allow you to call the kata-manager script directly as shown below, run the following command:

$ sudo chmod 755 /opt/kata/bin/kata-manager*

Alternatively, call the kata-manager script using sudo(1) by specifying its full path in all the examples below. For example, to show the usage statement:

$ sudo /opt/kata/bin/kata-manager -h

Note:

For further details, see: kata-containers#9373.

The kata-manager.sh script automatically installs and configures Kata Containers and a container manager (such as containerd, Docker and nerdctl).

By default, the script installs the latest versions of Kata Containers and containerd. However, be aware of the following before proceeding:

  • Packages will not be automatically updated

    Since a package manager is not being used, it is your responsibility to ensure these packages are kept up-to-date when new versions are released to ensure you are using a version that includes the latest security and bug fixes.

  • Potentially untested versions or version combinations

    This script installs the newest versions of Kata Containers and containerd from binary release packages. These versions may not have been tested with your distribution version.

If you still wish to continue, but prefer a manual installation, see the containerd installation guide.

Install a minimal Kata Containers system

By default, the script will attempt to install Kata Containers and containerd, and then configure containerd to use Kata Containers. However, the script provides a number of options to allow you to change its behaviour.

Notes:

  • Before running the script to install Kata Containers, we recommend that you review the available options.

  • The kata-manager.sh script is now packaged as part of the Kata Containers release and can be called as either kata-manager.sh or simply kata-manager. Some of the sections below give two examples of how to run the script: running the local version, and by downloading and running the latest version in the Kata Containers GitHub repository. If your version of Kata Containers includes the kata-manager.sh script, you can run either version although we would suggest you use the local version since: (a) it has been tested with the Kata Containers release you are using; and (b) it is simpler to run the command directly.

Show available options

To show the available options without installing anything, run:

$ bash -c "$(curl -fsSL https://raw.githubusercontent.com/kata-containers/kata-containers/main/utils/kata-manager.sh) -h"

To install Kata Containers only

If your system already has containerd installed, to install Kata Containers and only configure containerd, run:

$ bash -c "$(curl -fsSL https://raw.githubusercontent.com/kata-containers/kata-containers/main/utils/kata-manager.sh) -o"

To install Kata Containers and containerd

To install and configure a system with Kata Containers and containerd, run:

$ bash -c "$(curl -fsSL https://raw.githubusercontent.com/kata-containers/kata-containers/main/utils/kata-manager.sh)"

Choose a Hypervisor

Kata works with different hypervisors. When you install a Kata system, the default hypervisor will be configured, but all the available hypervisors are installed. This means you can switch between hypervisors whenever you wish.

List available hypervisors

Run the following command on an installed system:

$ kata-manager -L

Show the default packaged hypervisor

To show the default packaged hypervisor, run the following command on an installed system:

$ kata-manager -L | grep default

Show the locally configured hypervisor

kata-manager.sh will create a "local" copy of the packaged Kata configuration file.

To show details of the local copy of the configuration files, run the following command on an installed system:

$ kata-manager -e

Note: This command can only be run once Kata has been installed.

See the configuration documentation for further information.

Switch hypervisor

Note:

If you create your own local configuration files, you should ensure they are backed up safely before switching hypervisor configuration since the script will overwrite any files that it needs to create in the Kata configuration directory (/etc/kata-containers/ and sub-directories).

To install Kata Containers and containerd and configure it for a specific hypervisor

To specify that Kata be installed and configured to use a specific hypervisor, use the -H option. For example, to select Cloud Hypervisor, run:

$ bash -c "$(curl -fsSL https://raw.githubusercontent.com/kata-containers/kata-containers/main/utils/kata-manager.sh) -H clh"

Note: See the List available hypervisors section for details of how to obtain the list of available hypervisor names.

To switch the locally installed hypervisor

To switch the local hypervisor config on an installed system use the -S option. For example, to switch to the Cloud Hypervisor hypervisor, run the following command on an installed system:

$ kata-manager -S clh

Note: See the List available hypervisors section for details of how to obtain the list of available hypervisor names.

Switch to the default packaged hypervisor

To undo your changes and switch back to the default Kata hypervisor, specify the hypervisor name as default. For example, run the following command on an installed system:

$ kata-manager -S default