diff --git a/README.md b/README.md index abca641f4..25b6e5867 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,12 @@ transitioning from a standalone binary that talks to containerd to a plugin within containerd. This github branch is for the `cri` plugin. See [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.* [![Build Status](https://api.travis-ci.org/containerd/cri.svg?style=flat-square)](https://travis-ci.org/containerd/cri) -[![Go Report Card](https://goreportcard.com/badge/github.com/containerd/cri?style=flat-square)](https://goreportcard.com/report/github.com/containerd/cri) +[![Go Report Card](https://goreportcard.com/badge/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). @@ -20,20 +22,22 @@ With it, you could run Kubernetes using containerd as the container runtime. ## Current Status `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 (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 [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). See [test dashboard](https://k8s-testgrid.appspot.com/sig-node-containerd) ## Support Metrics -| CRI-Containerd Version | CRI Plugin Version | Kubernetes Version | -|:----------------------:|:------------------:|:------------------:| -| v1.0.0-alpha.x | | 1.7, 1.8 | -| v1.0.0-beta.x | | 1.9 | -| End-Of-Life | HEAD | 1.10+ | +| CRI-Containerd Version | Containerd Version | Kubernetes Version | CRI Version | +|:----------------------:|:------------------:|:------------------:|:-----------:| +| v1.0.0-alpha.x | | 1.7, 1.8 | v1alpha1 | +| v1.0.0-beta.x | | 1.9 | v1alpha1 | +| End-Of-Life | v1.1 | 1.10+ | v1alpha2 | +| | HEAD | 1.10+ | v1alpha2 | + ## Production Quality Cluster on GCE For a production quality cluster on GCE brought up with `kube-up.sh` refer [here](docs/kube-up.md). ## Installing with Ansible and Kubeadm diff --git a/docs/cri.png b/docs/cri.png index 2935bd117..0373b3bc0 100644 Binary files a/docs/cri.png and b/docs/cri.png differ diff --git a/docs/installation.md b/docs/installation.md index 91885f50a..ae2a57064 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,37 +1,39 @@ -# Install CRI-Containerd with Release Tarball -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. *Note: You need to run the following steps on each node you are planning to use in your Kubernetes cluster.* ## 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 - As shown below, the release tarball contains: 1) `containerd`, `containerd-shim`, `containerd-stress`, `containerd-release`, `ctr`: binaries for containerd. 2) `runc`: runc binary. -3) `crictl`: command line tools for CRI container runtime. -4) `containerd.service`: Systemd unit for containerd. -5) `/opt/cri-containerd/cluster/`: scripts for `kube-up.sh`. +3) `crictl`, `crictl.yaml`: command line tools for CRI container runtime and its config file. +4) `critest`: binary to run [CRI validation test](https://github.com/kubernetes-incubator/cri-tools/blob/master/docs/validation.md). +5) `containerd.service`: Systemd unit for containerd. +6) `/opt/containerd/cluster/`: scripts for `kube-up.sh`. ```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/cri-containerd/ -./opt/cri-containerd/cluster/ -./opt/cri-containerd/cluster/gce/ -./opt/cri-containerd/cluster/gce/cloud-init/ -./opt/cri-containerd/cluster/gce/cloud-init/node.yaml -./opt/cri-containerd/cluster/gce/cloud-init/master.yaml -./opt/cri-containerd/cluster/gce/configure.sh -./opt/cri-containerd/cluster/health-monitor.sh -./opt/cri-containerd/cluster/env -./usr/ -./usr/local/ -./usr/local/sbin/ +./opt +./opt/containerd +./opt/containerd/cluster +./opt/containerd/cluster/gce +./opt/containerd/cluster/gce/cloud-init +./opt/containerd/cluster/gce/cloud-init/node.yaml +./opt/containerd/cluster/gce/cloud-init/master.yaml +./opt/containerd/cluster/gce/configure.sh +./opt/containerd/cluster/gce/env +./opt/containerd/cluster/version +./opt/containerd/cluster/health-monitor.sh +./usr +./usr/local +./usr/local/sbin ./usr/local/sbin/runc -./usr/local/bin/ +./usr/local/bin ./usr/local/bin/crictl ./usr/local/bin/containerd ./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-shim ./usr/local/bin/ctr -./etc/ -./etc/systemd/ -./etc/systemd/system/ +./etc +./etc/systemd +./etc/systemd/system ./etc/systemd/system/containerd.service ./etc/crictl.yaml ``` @@ -50,8 +52,7 @@ Information about the binaries in the release tarball: | Binary Name | Support | OS | Architecture | |:------------------------------:|:------------------:|:-----:|:------------:| -| containerd | seccomp, apparmor, | linux | amd64 | -| | overlay, btrfs | | | +| containerd | seccomp, apparmor,
overlay, btrfs | linux | amd64 | | containerd-shim | overlay, btrfs | 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 -The release tarball could be downloaded from either of the following sources: -1. Release on github (see [here](https://github.com/containerd/cri/releases)); -2. Release GCS bucket https://storage.googleapis.com/cri-containerd-release/. +The release tarball could be downloaded from the release GCS bucket https://storage.googleapis.com/cri-containerd-release/. ## Step 0: Install Dependent Libraries Install required libraries for seccomp and libapparmor. @@ -74,31 +73,28 @@ sudo apt-get install libapparmor 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)). 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 -Download release tarball for the cri-containerd version you want to install from sources listed [above](#download). +## Step 1: Download Release Tarball +Download release tarball for the `containerd` version you want to install from the GCS bucket. ```bash 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 sha256sum cri-containerd-${VERSION}.linux-amd64.tar.gz 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. ``` -## Step 2: Install CRI-Containerd +## Step 2: Install Containerd If you are using systemd, just simply unpack the tarball to the root directory: - ```bash 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 ``` 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 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 -Create the systemd drop-in file `/etc/systemd/system/kubelet.service.d/0-cri-containerd.conf`: +## Step 4: Create Systemd Drop-In for Containerd +Create the systemd drop-in file `/etc/systemd/system/kubelet.service.d/0-containerd.conf`: ``` [Service] Environment="KUBELET_EXTRA_ARGS=--container-runtime=remote --runtime-request-timeout=15m --container-runtime-endpoint=/run/containerd/containerd.sock" diff --git a/docs/registry.md b/docs/registry.md index 18b27ae1f..d3dba4917 100644 --- a/docs/registry.md +++ b/docs/registry.md @@ -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 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. diff --git a/docs/testing.md b/docs/testing.md index a9e6ebcb9..b571e02bf 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -55,4 +55,3 @@ make test-e2e-node 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. -