Merge pull request #696 from Random-Liu/update-document
Update documents.
This commit is contained in:
commit
205892d935
22
README.md
22
README.md
@ -8,10 +8,12 @@
|
|||||||
transitioning from a standalone binary that talks to containerd to a plugin within
|
transitioning from a standalone binary that talks to containerd to a plugin within
|
||||||
containerd. This github branch is for the `cri` plugin. See
|
containerd. This github branch is for the `cri` plugin. See
|
||||||
[standalone-cri-containerd branch](https://github.com/containerd/cri/tree/standalone-cri-containerd)
|
[standalone-cri-containerd branch](https://github.com/containerd/cri/tree/standalone-cri-containerd)
|
||||||
for information about the standalone version of cri-containerd.*
|
for information about the standalone version of `cri-containerd`.*
|
||||||
|
|
||||||
|
*Note: You need to [drain your node](https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/) before upgrading from standalone `cri-containerd` to containerd with `cri` plugin.*
|
||||||
|
|
||||||
[](https://travis-ci.org/containerd/cri)
|
[](https://travis-ci.org/containerd/cri)
|
||||||
[](https://goreportcard.com/report/github.com/containerd/cri)
|
[](https://goreportcard.com/report/github.com/containerd/cri)
|
||||||
|
|
||||||
`cri` is a [containerd](https://containerd.io/) plugin implementation of Kubernetes [container runtime interface (CRI)](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/apis/cri/runtime/v1alpha2/api.proto).
|
`cri` is a [containerd](https://containerd.io/) plugin implementation of Kubernetes [container runtime interface (CRI)](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/apis/cri/runtime/v1alpha2/api.proto).
|
||||||
|
|
||||||
@ -20,20 +22,22 @@ With it, you could run Kubernetes using containerd as the container runtime.
|
|||||||
## Current Status
|
## Current Status
|
||||||
`cri` is a native plugin of containerd 1.1 and above. It is built into containerd and enabled by default.
|
`cri` is a native plugin of containerd 1.1 and above. It is built into containerd and enabled by default.
|
||||||
|
|
||||||
`cri` is in beta:
|
`cri` is in GA:
|
||||||
* It is feature complete.
|
* It is feature complete.
|
||||||
* It (the beta version) works with Kubernetes >= 1.9.
|
* It (the GA version) works with Kubernetes 1.10 and above.
|
||||||
* It has passed all [CRI validation tests](https://github.com/kubernetes/community/blob/master/contributors/devel/cri-validation.md).
|
* It has passed all [CRI validation tests](https://github.com/kubernetes/community/blob/master/contributors/devel/cri-validation.md).
|
||||||
* It has passed all [node e2e tests](https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-node-tests.md).
|
* It has passed all [node e2e tests](https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-node-tests.md).
|
||||||
* It has passed all [e2e tests](https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-tests.md).
|
* It has passed all [e2e tests](https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-tests.md).
|
||||||
|
|
||||||
See [test dashboard](https://k8s-testgrid.appspot.com/sig-node-containerd)
|
See [test dashboard](https://k8s-testgrid.appspot.com/sig-node-containerd)
|
||||||
## Support Metrics
|
## Support Metrics
|
||||||
| CRI-Containerd Version | CRI Plugin Version | Kubernetes Version |
|
| CRI-Containerd Version | Containerd Version | Kubernetes Version | CRI Version |
|
||||||
|:----------------------:|:------------------:|:------------------:|
|
|:----------------------:|:------------------:|:------------------:|:-----------:|
|
||||||
| v1.0.0-alpha.x | | 1.7, 1.8 |
|
| v1.0.0-alpha.x | | 1.7, 1.8 | v1alpha1 |
|
||||||
| v1.0.0-beta.x | | 1.9 |
|
| v1.0.0-beta.x | | 1.9 | v1alpha1 |
|
||||||
| End-Of-Life | HEAD | 1.10+ |
|
| End-Of-Life | v1.1 | 1.10+ | v1alpha2 |
|
||||||
|
| | HEAD | 1.10+ | v1alpha2 |
|
||||||
|
|
||||||
## Production Quality Cluster on GCE
|
## Production Quality Cluster on GCE
|
||||||
For a production quality cluster on GCE brought up with `kube-up.sh` refer [here](docs/kube-up.md).
|
For a production quality cluster on GCE brought up with `kube-up.sh` refer [here](docs/kube-up.md).
|
||||||
## Installing with Ansible and Kubeadm
|
## Installing with Ansible and Kubeadm
|
||||||
|
BIN
docs/cri.png
BIN
docs/cri.png
Binary file not shown.
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 80 KiB |
@ -1,37 +1,39 @@
|
|||||||
# Install CRI-Containerd with Release Tarball
|
<!-- TODO(now) -->
|
||||||
This document provides the steps to install `cri-containerd` and its dependencies with the release tarball, and bring up a Kubernetes cluster using kubeadm.
|
# Install Containerd with Release Tarball
|
||||||
|
This document provides the steps to install `containerd` and its dependencies with the release tarball, and bring up a Kubernetes cluster using kubeadm.
|
||||||
|
|
||||||
These steps have been verified on Ubuntu 16.04. For other OS distributions, the steps may differ. Please feel free to file issues or PRs if you encounter any problems on other OS distributions.
|
These steps have been verified on Ubuntu 16.04. For other OS distributions, the steps may differ. Please feel free to file issues or PRs if you encounter any problems on other OS distributions.
|
||||||
|
|
||||||
*Note: You need to run the following steps on each node you are planning to use in your Kubernetes cluster.*
|
*Note: You need to run the following steps on each node you are planning to use in your Kubernetes cluster.*
|
||||||
## Release Tarball
|
## Release Tarball
|
||||||
For each release, we'll publish a release tarball. The release tarball contains all required binaries and files for `cri-containerd`.
|
For each `containerd` release, we'll publish a release tarball specifically for Kubernetes named `cri-containerd-${VERSION}.${OS}-${ARCH}.tar.gz`. The release tarball contains all required binaries and files for using `containerd` with Kubernetes.
|
||||||
### Content
|
### Content
|
||||||
<!-- TODO(random-liu): Update the release tarball information -->
|
|
||||||
As shown below, the release tarball contains:
|
As shown below, the release tarball contains:
|
||||||
1) `containerd`, `containerd-shim`, `containerd-stress`, `containerd-release`, `ctr`: binaries for containerd.
|
1) `containerd`, `containerd-shim`, `containerd-stress`, `containerd-release`, `ctr`: binaries for containerd.
|
||||||
2) `runc`: runc binary.
|
2) `runc`: runc binary.
|
||||||
3) `crictl`: command line tools for CRI container runtime.
|
3) `crictl`, `crictl.yaml`: command line tools for CRI container runtime and its config file.
|
||||||
4) `containerd.service`: Systemd unit for containerd.
|
4) `critest`: binary to run [CRI validation test](https://github.com/kubernetes-incubator/cri-tools/blob/master/docs/validation.md).
|
||||||
5) `/opt/cri-containerd/cluster/`: scripts for `kube-up.sh`.
|
5) `containerd.service`: Systemd unit for containerd.
|
||||||
|
6) `/opt/containerd/cluster/`: scripts for `kube-up.sh`.
|
||||||
```console
|
```console
|
||||||
$ tar -tf cri-containerd-1.0.0-beta.0.linux-amd64.tar.gz
|
$ tar -tf cri-containerd-1.1.0-rc.0.linux-amd64.tar.gz
|
||||||
./
|
./
|
||||||
./opt/
|
./opt
|
||||||
./opt/cri-containerd/
|
./opt/containerd
|
||||||
./opt/cri-containerd/cluster/
|
./opt/containerd/cluster
|
||||||
./opt/cri-containerd/cluster/gce/
|
./opt/containerd/cluster/gce
|
||||||
./opt/cri-containerd/cluster/gce/cloud-init/
|
./opt/containerd/cluster/gce/cloud-init
|
||||||
./opt/cri-containerd/cluster/gce/cloud-init/node.yaml
|
./opt/containerd/cluster/gce/cloud-init/node.yaml
|
||||||
./opt/cri-containerd/cluster/gce/cloud-init/master.yaml
|
./opt/containerd/cluster/gce/cloud-init/master.yaml
|
||||||
./opt/cri-containerd/cluster/gce/configure.sh
|
./opt/containerd/cluster/gce/configure.sh
|
||||||
./opt/cri-containerd/cluster/health-monitor.sh
|
./opt/containerd/cluster/gce/env
|
||||||
./opt/cri-containerd/cluster/env
|
./opt/containerd/cluster/version
|
||||||
./usr/
|
./opt/containerd/cluster/health-monitor.sh
|
||||||
./usr/local/
|
./usr
|
||||||
./usr/local/sbin/
|
./usr/local
|
||||||
|
./usr/local/sbin
|
||||||
./usr/local/sbin/runc
|
./usr/local/sbin/runc
|
||||||
./usr/local/bin/
|
./usr/local/bin
|
||||||
./usr/local/bin/crictl
|
./usr/local/bin/crictl
|
||||||
./usr/local/bin/containerd
|
./usr/local/bin/containerd
|
||||||
./usr/local/bin/containerd-stress
|
./usr/local/bin/containerd-stress
|
||||||
@ -39,9 +41,9 @@ $ tar -tf cri-containerd-1.0.0-beta.0.linux-amd64.tar.gz
|
|||||||
./usr/local/bin/containerd-release
|
./usr/local/bin/containerd-release
|
||||||
./usr/local/bin/containerd-shim
|
./usr/local/bin/containerd-shim
|
||||||
./usr/local/bin/ctr
|
./usr/local/bin/ctr
|
||||||
./etc/
|
./etc
|
||||||
./etc/systemd/
|
./etc/systemd
|
||||||
./etc/systemd/system/
|
./etc/systemd/system
|
||||||
./etc/systemd/system/containerd.service
|
./etc/systemd/system/containerd.service
|
||||||
./etc/crictl.yaml
|
./etc/crictl.yaml
|
||||||
```
|
```
|
||||||
@ -50,8 +52,7 @@ Information about the binaries in the release tarball:
|
|||||||
|
|
||||||
| Binary Name | Support | OS | Architecture |
|
| Binary Name | Support | OS | Architecture |
|
||||||
|:------------------------------:|:------------------:|:-----:|:------------:|
|
|:------------------------------:|:------------------:|:-----:|:------------:|
|
||||||
| containerd | seccomp, apparmor, | linux | amd64 |
|
| containerd | seccomp, apparmor, <br/> overlay, btrfs | linux | amd64 |
|
||||||
| | overlay, btrfs | | |
|
|
||||||
| containerd-shim | overlay, btrfs | linux | amd64 |
|
| containerd-shim | overlay, btrfs | linux | amd64 |
|
||||||
| runc | seccomp, apparmor | linux | amd64 |
|
| runc | seccomp, apparmor | linux | amd64 |
|
||||||
|
|
||||||
@ -60,9 +61,7 @@ If you have other requirements for the binaries, e.g. selinux support, another a
|
|||||||
|
|
||||||
### Download
|
### Download
|
||||||
|
|
||||||
The release tarball could be downloaded from either of the following sources:
|
The release tarball could be downloaded from the release GCS bucket https://storage.googleapis.com/cri-containerd-release/.
|
||||||
1. Release on github (see [here](https://github.com/containerd/cri/releases));
|
|
||||||
2. Release GCS bucket https://storage.googleapis.com/cri-containerd-release/.
|
|
||||||
|
|
||||||
## Step 0: Install Dependent Libraries
|
## Step 0: Install Dependent Libraries
|
||||||
Install required libraries for seccomp and libapparmor.
|
Install required libraries for seccomp and libapparmor.
|
||||||
@ -74,31 +73,28 @@ sudo apt-get install libapparmor
|
|||||||
Note that:
|
Note that:
|
||||||
1) If you are using Ubuntu <=Trusty or Debian <=jessie, a backported version of `libseccomp2` is needed. (See the [trusty-backports](https://packages.ubuntu.com/trusty-backports/libseccomp2) and [jessie-backports](https://packages.debian.org/jessie-backports/libseccomp2)).
|
1) If you are using Ubuntu <=Trusty or Debian <=jessie, a backported version of `libseccomp2` is needed. (See the [trusty-backports](https://packages.ubuntu.com/trusty-backports/libseccomp2) and [jessie-backports](https://packages.debian.org/jessie-backports/libseccomp2)).
|
||||||
2) If your OS distro doesn't support AppArmor, please skip installing `libapparmor`, and AppArmor will be disabled.
|
2) If your OS distro doesn't support AppArmor, please skip installing `libapparmor`, and AppArmor will be disabled.
|
||||||
## Step 1: Download CRI-Containerd Release Tarball
|
## Step 1: Download Release Tarball
|
||||||
Download release tarball for the cri-containerd version you want to install from sources listed [above](#download).
|
Download release tarball for the `containerd` version you want to install from the GCS bucket.
|
||||||
```bash
|
```bash
|
||||||
wget https://storage.googleapis.com/cri-containerd-release/cri-containerd-${VERSION}.linux-amd64.tar.gz
|
wget https://storage.googleapis.com/cri-containerd-release/cri-containerd-${VERSION}.linux-amd64.tar.gz
|
||||||
```
|
```
|
||||||
Validate checksum of the release tarball (note that checksum is added since v1.0.0-beta.0):
|
Validate checksum of the release tarball:
|
||||||
```bash
|
```bash
|
||||||
sha256sum cri-containerd-${VERSION}.linux-amd64.tar.gz
|
sha256sum cri-containerd-${VERSION}.linux-amd64.tar.gz
|
||||||
curl https://storage.googleapis.com/cri-containerd-release/cri-containerd-${VERSION}.linux-amd64.tar.gz.sha256
|
curl https://storage.googleapis.com/cri-containerd-release/cri-containerd-${VERSION}.linux-amd64.tar.gz.sha256
|
||||||
# Compare to make sure the 2 checksums are the same.
|
# Compare to make sure the 2 checksums are the same.
|
||||||
```
|
```
|
||||||
## Step 2: Install CRI-Containerd
|
## Step 2: Install Containerd
|
||||||
If you are using systemd, just simply unpack the tarball to the root directory:
|
If you are using systemd, just simply unpack the tarball to the root directory:
|
||||||
<!-- TODO(random-liu): Remove cni directory operations after we deprecate v1.0.0-beta.1 -->
|
|
||||||
```bash
|
```bash
|
||||||
sudo tar -C / -xzf cri-containerd-${VERSION}.linux-amd64.tar.gz
|
sudo tar -C / -xzf cri-containerd-${VERSION}.linux-amd64.tar.gz
|
||||||
sudo mkdir -p /opt/cni/bin/
|
|
||||||
sudo mkdir -p /etc/cni/net.d
|
|
||||||
sudo systemctl start containerd
|
sudo systemctl start containerd
|
||||||
```
|
```
|
||||||
If you are not using systemd, please unpack all binaries into a directory in your `PATH`, and start `containerd` as monitored long running services with the service manager you are using e.g. `supervisord`, `upstart` etc.
|
If you are not using systemd, please unpack all binaries into a directory in your `PATH`, and start `containerd` as monitored long running services with the service manager you are using e.g. `supervisord`, `upstart` etc.
|
||||||
## Step 3: Install Kubeadm, Kubelet and Kubectl
|
## Step 3: Install Kubeadm, Kubelet and Kubectl
|
||||||
Follow [the instructions](https://kubernetes.io/docs/setup/independent/install-kubeadm/) to install kubeadm, kubelet and kubectl.
|
Follow [the instructions](https://kubernetes.io/docs/setup/independent/install-kubeadm/) to install kubeadm, kubelet and kubectl.
|
||||||
## Step 4: Create Systemd Drop-In for CRI-Containerd
|
## Step 4: Create Systemd Drop-In for Containerd
|
||||||
Create the systemd drop-in file `/etc/systemd/system/kubelet.service.d/0-cri-containerd.conf`:
|
Create the systemd drop-in file `/etc/systemd/system/kubelet.service.d/0-containerd.conf`:
|
||||||
```
|
```
|
||||||
[Service]
|
[Service]
|
||||||
Environment="KUBELET_EXTRA_ARGS=--container-runtime=remote --runtime-request-timeout=15m --container-runtime-endpoint=/run/containerd/containerd.sock"
|
Environment="KUBELET_EXTRA_ARGS=--container-runtime=remote --runtime-request-timeout=15m --container-runtime-endpoint=/run/containerd/containerd.sock"
|
||||||
|
@ -16,6 +16,7 @@ To configure image registries create/modify the `/etc/containerd/config.toml` as
|
|||||||
|
|
||||||
The default configuration can be generated by `containerd config default > /etc/containerd/config.toml`.
|
The default configuration can be generated by `containerd config default > /etc/containerd/config.toml`.
|
||||||
|
|
||||||
The endpoint is a list that can contain multiple image registry URLs split by commas.
|
The endpoint is a list that can contain multiple image registry URLs split by commas. When pulling an image
|
||||||
|
from a registry, containerd will try these endpoint URLs one by one, and use the first working one.
|
||||||
|
|
||||||
After modify the config file, you need restart the `containerd` service.
|
After modify the config file, you need restart the `containerd` service.
|
||||||
|
@ -55,4 +55,3 @@ make test-e2e-node
|
|||||||
make test-e2e-node FOCUS=REGEXP_TO_FOCUS SKIP=REGEXP_TO_SKIP
|
make test-e2e-node FOCUS=REGEXP_TO_FOCUS SKIP=REGEXP_TO_SKIP
|
||||||
```
|
```
|
||||||
[More information](https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-node-tests.md) about Kubernetes node e2e test.
|
[More information](https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-node-tests.md) about Kubernetes node e2e test.
|
||||||
<!-- TODO: Add cluster e2e test -->
|
|
||||||
|
Loading…
Reference in New Issue
Block a user