You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Went through and made a few grammar and format updates to make how-to guide
easier to follow, as well as add direct links to project Github pages where applicable.
Fixes: kata-containers#127
Signed-off-by: trilliams <[email protected]>
howto: k8s grammar and format changes
Went through and made a few grammar and format updates to make how-to guide
easier to follow, as well as add direct links to project Github pages where applicable.
Fixes: kata-containers#127
Signed-off-by: trilliams <[email protected]>
# How to use Kata Containers and CRI (containerd plugin) with Kubernetes
2
2
3
-
This document describes how to set up a single-machine Kubernetes cluster.
4
-
The Kubernetes cluster will use the CRI containerd plugin and Kata Containers to launch untrusted workloads.
3
+
This document describes how to set up a single-machine Kubernetes cluster. The Kubernetes cluster will use the [CRI containerd plugin](https://github.com/containerd/cri) and [Kata Containers](https://katacontainers.io) to launch untrusted workloads.
4
+
5
+
## Requirements
5
6
6
-
## Requirements
7
7
- Kubernetes, kubelet, kubeadm
8
8
- cri-containerd
9
9
- Kata Containers
10
10
11
-
For information about the supported version of these components see
12
-
Kata Containers [versions.yaml](https://github.com/kata-containers/runtime/blob/master/versions.yaml) file.
11
+
Note|
12
+
----------------- |
13
+
|For information about the supported versions of these components, see the Kata Containers [versions.yaml](https://github.com/kata-containers/runtime/blob/master/versions.yaml) file. |
14
+
13
15
14
16
## Install containerd(with CRI plugin enabled)
15
17
16
18
Follow the instructions from [CRI installation guide](http://github.com/containerd/cri/blob/master/docs/installation.md)
17
19
18
-
<!---
19
20
```bash
20
21
# Check if containerd is installed
21
22
$ command -v containerd
22
23
```
23
-
--->
24
24
25
-
## Install Kata Containers
25
+
## Install Kata Containers
26
26
27
27
Follow the instructions to [install Kata](https://github.com/kata-containers/documentation/blob/master/install/README.md).
28
28
29
-
<!---
30
29
```bash
31
30
# Check if kata-runtime is installed
32
31
$ command -v kata-runtime
33
32
# Check kata is well configured
34
33
$ kata-runtime kata-env
35
34
```
36
-
--->
37
35
38
36
## Install Kubernetes
39
-
Install Kubernetes in your host. See kubeadm [installation](https://kubernetes.io/docs/tasks/tools/install-kubeadm/)
40
-
<!---
37
+
Install Kubernetes in your host. See [kubeadm installation](https://kubernetes.io/docs/setup/independent/install-kubeadm/)
38
+
41
39
```bash
42
40
# Check if kubadm is installed
43
41
$ command -v kubeadm
44
42
```
45
-
--->
46
43
47
44
### Configure containerd to use Kata Containers
48
45
49
-
The CRI containerd plugin support configuration for two runtime types.
46
+
The CRI containerd plugin supports configuration for two runtime types.
50
47
51
-
- Default runtime: A runtime that is used by default to run workloads.
52
-
- Untrusted workload runtime: A runtime that will be used run untrusted workloads.
48
+
-**Default runtime:** A runtime that is used by default to run workloads.
49
+
-**Untrusted workload runtime:** A runtime that will be used to run untrusted workloads.
53
50
54
-
#### Define the Kata runtime as `untrusted_workload_runtime`
51
+
#### Define the Kata runtime as `untrusted_workload_runtime`
55
52
56
-
Configure the Kata runtime for untrusted workload with the [config option](https://github.com/containerd/cri/blob/v1.0.0-rc.0/docs/config.md)
Configure the Kata runtime for untrusted workloads with the [config option](https://github.com/containerd/cri/blob/v1.0.0-rc.0/docs/config.md)`plugins.cri.containerd.untrusted_workload_runtime`.
58
54
59
55
Unless configured otherwise, the default runtime is set to `runc`.
56
+
60
57
```bash
61
58
# Configure containerd to use Kata as untrusted_workload_runtime
62
59
$ sudo mkdir -p /etc/containerd/
60
+
```
61
+
```bash
63
62
$ cat <<EOT | sudo tee /etc/containerd/config.toml
64
63
[plugins]
65
64
[plugins.cri.containerd]
@@ -71,23 +70,33 @@ EOT
71
70
72
71
### Configure Kubelet to use containerd
73
72
74
-
In order to allow kubelet use containerd (using CRI interface) configure the service to
75
-
point to containerd socket.
73
+
74
+
75
+
76
+
77
+
78
+
In order to allow kubelet to use containerd (using CRI interface), configure the service to point to the `containerd` socket.
Install a pod network plugin is needed to allow pods communicate with each other.
154
+
### Install a Pod Network
155
+
156
+
A pod network plugin is needed to allow pods to communicate with each other.
157
+
158
+
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.
137
159
138
-
Install flannel plugging, by following the instructions in the section *Installing a pod network*
139
-
from [Using kubeadm to Create a Cluster ](https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/)
140
-
guide.
141
160
142
-
<!---
143
161
```bash
144
162
# Install a pod network using flannel
145
163
# There is not a programmatic way to know last what flannel commit use
146
164
# See https://github.com/coreos/flannel/issues/995
### Create an unstrusted pod using Kata Containers
194
+
195
+
By default, all pods are created with the default runtime configured in CRI containerd plugin. If a pod has the `io.kubernetes.cri.untrusted-workload` annotation set to `"true"`, the CRI plugin runs the pod with the [Kata Containers runtime](https://github.com/kata-containers/runtime/blob/master/README.md).
178
196
179
-
By default, all pods are created with the default runtime configured in CRI containerd plugin.
180
-
If a pod has the `io.kubernetes.cri.untrusted-workload annotation` set as
181
-
`"true"`, the CRI plugin will run the pod with the Kata Containers runtime.
0 commit comments