Commit c51149d1 authored by galal-hussein's avatar galal-hussein

Update README with containerd template

parent 6a43f63c
...@@ -80,7 +80,7 @@ flag ...@@ -80,7 +80,7 @@ flag
At this point, you can run the agent as a separate process or not run it on this node at all. At this point, you can run the agent as a separate process or not run it on this node at all.
If you encounter an error like `"stream server error: listen tcp: lookup some-host on X.X.X.X:53: no such host"` If you encounter an error like `"stream server error: listen tcp: lookup some-host on X.X.X.X:53: no such host"`
when starting k3s please ensure `/etc/hosts` contains your current hostname (output of `hostname`), when starting k3s please ensure `/etc/hosts` contains your current hostname (output of `hostname`),
set to a 127.x.x.x address. For example: set to a 127.x.x.x address. For example:
``` ```
127.0.1.1 myhost 127.0.1.1 myhost
...@@ -252,6 +252,10 @@ yes then you just need to run the agent with the `--docker` flag ...@@ -252,6 +252,10 @@ yes then you just need to run the agent with the `--docker` flag
k3s agent -s ${SERVER_URL} -t ${NODE_TOKEN} --docker & k3s agent -s ${SERVER_URL} -t ${NODE_TOKEN} --docker &
k3s will generate config.toml for containerd in `/var/lib/rancher/k3s/agent/etc/containerd/config.toml`, for advanced customization for this file you can create another file called `config.toml.tmpl` in the same directory and it will be used instead.
The `config.toml.tmpl` will be treated as a Golang template file, and the `config.Node` structure is being passed to the template,the following is an example on how to use the structure to customize the configuration file https://github.com/rancher/k3s/blob/master/pkg/agent/templates/templates.go#L16-L32
systemd systemd
------- -------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment