diff --git a/docs/how-to/how-to-set-sandbox-config-kata.md b/docs/how-to/how-to-set-sandbox-config-kata.md index 4d8d1d8457..43e8d4df1f 100644 --- a/docs/how-to/how-to-set-sandbox-config-kata.md +++ b/docs/how-to/how-to-set-sandbox-config-kata.md @@ -80,6 +80,8 @@ There are several kinds of Kata configurations and they are listed below. In case of CRI-O, all annotations specified in the pod spec are passed down to Kata. +# containerd Configuration + For containerd, annotations specified in the pod spec are passed down to Kata starting with version `1.3.0` of containerd. Additionally, extra configuration is needed for containerd, by providing a `pod_annotations` field in the containerd config @@ -92,11 +94,9 @@ for passing annotations to Kata from containerd: $ cat /etc/containerd/config .... -[plugins.cri.containerd.runtimes.kata] - runtime_type = "io.containerd.runc.v1" + [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.kata] + runtime_type = "io.containerd.kata.v2" pod_annotations = ["io.katacontainers.*"] - [plugins.cri.containerd.runtimes.kata.options] - BinaryName = "/usr/bin/kata-runtime" .... ``` diff --git a/docs/how-to/how-to-use-k8s-with-cri-containerd-and-kata.md b/docs/how-to/how-to-use-k8s-with-cri-containerd-and-kata.md index c8b095711e..94eb91bb80 100644 --- a/docs/how-to/how-to-use-k8s-with-cri-containerd-and-kata.md +++ b/docs/how-to/how-to-use-k8s-with-cri-containerd-and-kata.md @@ -7,9 +7,10 @@ * [Configure Kubelet to use containerd](#configure-kubelet-to-use-containerd) * [Configure HTTP proxy - OPTIONAL](#configure-http-proxy---optional) * [Start Kubernetes](#start-kubernetes) -* [Install a Pod Network](#install-a-pod-network) +* [Configure Pod Network](#configure-pod-network) * [Allow pods to run in the master node](#allow-pods-to-run-in-the-master-node) -* [Create an untrusted pod using Kata Containers](#create-an-untrusted-pod-using-kata-containers) +* [Create runtime class for Kata Containers](#create-runtime-class-for-kata-containers) +* [Run pod in Kata Containers](#run-pod-in-kata-containers) * [Delete created pod](#delete-created-pod) This document describes how to set up a single-machine Kubernetes (k8s) cluster. @@ -18,9 +19,6 @@ The Kubernetes cluster will use the [CRI containerd plugin](https://github.com/containerd/cri) and [Kata Containers](https://katacontainers.io) to launch untrusted workloads. -For Kata Containers 1.5.0-rc2 and above, we will use `containerd-shim-kata-v2` (short as `shimv2` in this documentation) -to launch Kata Containers. For the previous version of Kata Containers, the Pods are launched with `kata-runtime`. - ## Requirements - Kubernetes, Kubelet, `kubeadm` @@ -125,43 +123,33 @@ $ sudo systemctl daemon-reload $ sudo -E kubectl get pods ``` -## Install a Pod Network +## Configure Pod Network A pod network plugin is needed to allow pods to communicate with each other. +You can find more about CNI plugins from the [Creating a cluster with `kubeadm`](https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/#instructions) guide. -- Install the `flannel` plugin by following the - [Using `kubeadm` to Create a Cluster](https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/#instructions) - guide, starting from the **Installing a pod network** section. - -- Create a pod network using flannel - - > **Note:** There is no known way to determine programmatically the best version (commit) to use. - > See https://github.com/coreos/flannel/issues/995. +By default the CNI plugin binaries is installed under `/opt/cni/bin` (in package `kubernetes-cni`), you only need to create a configuration file for CNI plugin. ```bash - $ sudo -E kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml - ``` + $ sudo -E mkdir -p /etc/cni/net.d -- Wait for the pod network to become available - - ```bash - # number of seconds to wait for pod network to become available - $ timeout_dns=420 - - $ while [ "$timeout_dns" -gt 0 ]; do - if sudo -E kubectl get pods --all-namespaces | grep dns | grep Running; then - break - fi - - sleep 1s - ((timeout_dns--)) - done - ``` - -- Check the pod network is running - - ```bash - $ sudo -E kubectl get pods --all-namespaces | grep dns | grep Running && echo "OK" || ( echo "FAIL" && false ) + $ sudo -E cat > /etc/cni/net.d/10-mynet.conf < runtime.yaml <Leap 15.2, Tumbleweed | -| [SUSE Linux Enterprise (SLE)](sle-installation-guide.md) | SLE 15 SP1, 15 SP2 | > **Note::** > diff --git a/docs/install/centos-installation-guide.md b/docs/install/centos-installation-guide.md index f55f20d962..df7340d268 100644 --- a/docs/install/centos-installation-guide.md +++ b/docs/install/centos-installation-guide.md @@ -3,15 +3,9 @@ 1. Install the Kata Containers components with the following commands: ```bash + $ sudo -E dnf install -y centos-release-advanced-virtualization + $ sudo -E dnf module disable -y virt:rhel $ source /etc/os-release - $ cat < /etc/apt/sources.list.d/kata-containers.list" - $ curl -sL http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/${BRANCH}/xUbuntu_$(lsb_release -rs)/Release.key | sudo apt-key add - - $ sudo -E apt-get update - $ sudo -E apt-get -y install kata-runtime kata-proxy kata-shim - ``` - -2. Decide which container manager to use and select the corresponding link that follows: - - [Kubernetes](../Developer-Guide.md#run-kata-containers-with-kubernetes) diff --git a/docs/use-cases/zun_kata.md b/docs/use-cases/zun_kata.md index fca0dcab94..20fa9c4f54 100644 --- a/docs/use-cases/zun_kata.md +++ b/docs/use-cases/zun_kata.md @@ -10,9 +10,6 @@ Currently, the instructions are based on the following links: - https://docs.openstack.org/zun/latest/admin/clear-containers.html -- ../install/ubuntu-installation-guide.md - - ## Install Git to use with DevStack ```sh @@ -54,7 +51,7 @@ $ zun delete test ## Install Kata Containers -Follow [these instructions](../install/ubuntu-installation-guide.md) +Follow [these instructions](../install/README.md) to install the Kata Containers components. ## Update Docker with new Kata Containers runtime