Skip to content

Commit 22011a2

Browse files
Update README.md.
1 parent 6167229 commit 22011a2

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

README.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,29 @@ mounts = [
113113
]
114114
```
115115

116+
## Networking
117+
118+
`nomad-driver-containerd` supports **host** and **bridge** networks.<br/>
119+
120+
**NOTE:** `host` and `bridge` are mutually exclusive options, and only one of them should be used at a time.
121+
122+
1. **Host** network can be enabled by setting `host_network` to `true` in task config
123+
of the job spec [Check under [`Supported options`](https://github.com/Roblox/nomad-driver-containerd#supported-options)].
124+
125+
2. **Bridge** network can be enabled by setting the `network` stanza in the task group section of the job spec.
126+
127+
```
128+
network {
129+
mode = "bridge"
130+
}
131+
```
132+
You need to install CNI plugins on nomad client nodes under `/opt/cni/bin` before you can use `bridge` networks.
133+
134+
**Instructions for installing CNI plugins.**<br/>
135+
- $ curl -L -o cni-plugins.tgz https://github.com/containernetworking/plugins/releases/download/v0.8.1/cni-plugins-linux-amd64-v0.8.1.tgz<br/>
136+
- sudo mkdir -p /opt/cni/bin<br/>
137+
- sudo tar -C /opt/cni/bin -xzf cni-plugins.tgz
138+
116139
## Tests
117140
```
118141
$ make test
@@ -140,11 +163,9 @@ Ubuntu (>= 16.04)
140163
`nomad-driver-containerd` [`v0.1`](https://github.com/Roblox/nomad-driver-containerd/releases/tag/v0.1) is **not** production ready.
141164
There are some open items which are currently being worked on.
142165

143-
1) **Networking**: Networking is **not in scope** of containerd as described [`here`](https://kubernetes.io/blog/2017/11/containerd-container-runtime-options-kubernetes/). However an external CNI plugin can be used to add networking to the container. We are researching on how to enable networking for our internal use-cases, and would publish (open-source) that work at some point.
144-
145-
2) **Port forwarding**: The ability to map a host port to a container port. This is currently not supported, but could be supported in future.
166+
1) **Port forwarding**: The ability to map a host port to a container port. This is currently not supported, but could be supported in future.
146167

147-
3) **Consul connect**: When a user launches a job in `nomad`, s/he can add a [`service stanza`](https://www.nomadproject.io/docs/job-specification/service) which will instruct `nomad` to register the service with `consul` for service discovery. This is currently not supported.
168+
2) **Consul connect**: When a user launches a job in `nomad`, s/he can add a [`service stanza`](https://www.nomadproject.io/docs/job-specification/service) which will instruct `nomad` to register the service with `consul` for service discovery. This is currently not supported.
148169

149170
## License
150171

0 commit comments

Comments
 (0)