docs update for cri-containerd to cri move

Signed-off-by: Mike Brown <brownwm@us.ibm.com>
This commit is contained in:
Mike Brown
2018-03-13 17:38:04 -05:00
parent 0c87604068
commit 0ee7614785
8 changed files with 104 additions and 147 deletions

View File

@@ -1,44 +1,9 @@
# Configure Image Registry for CRI-containerd
This document describes the methods to configure the image registry for `cri-containerd`.
# Configure Image Registry
This document describes the method to configure the image registry for `containerd` for use with the `cri` plugin.
In `cri-containerd`, `docker.io` is the default image registry. You can also set up other image registries similar to docker. `cri-containerd` provides two ways to set up the image registry.
With containerd, `docker.io` is the default image registry. You can also set up other image registries similar to docker.
<!-- TODO: will remove the document for standalone mode, ref `containerd/containerd#2120` -->
## Configure Image Registry with `--registry` Option
Start `cri-containerd` with `--registry` option like:
```bash
$ cri-containerd \
--registry=test.secure-registry.io=https://HostIP1:Port1 \
--registry=test.insecure-registry.io=http://HostIP2:Port2
```
If you want configure a insecure registry, you need set the endpoint with `http://` prefix. If you want to configure a secure registry, you need set the endpoint with `https://` prefix.
This method is only suitable for standalone mode.
## Configure Image Registry with Config File in Standalone Mode
In standalone mode, `cri-containerd` also specifies registris using the configuration file located in `/etc/cri-containerd/config.toml`. You can set registries in the configuration file as follows:
```toml
[registry.mirrors]
[registry.mirrors."docker.io"]
endpoint = ["https://registry-1.docker.io"]
[registry.mirrors."test.secure-registry.io"]
endpoint = ["https://HostIP1:Port1"]
[registry.mirrors."test.insecure-registry.io"]
endpoint = ["http://HostIP2:Port2"]
```
In the same way, the default configuration also can be generated by `cri-containerd default-config > /etc/cri-containerd/config.toml`.
The endpoint is a list that can contain multiple image registry URLs splited by commas.
After modify the config file, you need restart the `cri-containerd` service.
## Configure Image Registry with Config File in CRI Plugin Mode
Today, `cri-containerd` can also be used as a native plugin of `containerd`. In this mode, you should set registries in `/etc/containerd/config.toml` as follows:
To configure image registries create/modify the `/etc/containerd/config.toml` as follows:
```toml
[plugins.cri.registry.mirrors]
[plugins.cri.registry.mirrors."docker.io"]
@@ -51,6 +16,6 @@ Today, `cri-containerd` can also be used as a native plugin of `containerd`. In
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 splited by commas.
The endpoint is a list that can contain multiple image registry URLs split by commas.
After modify the config file, you need restart the `containerd` service.