Skip to content

Commit 6d30c48

Browse files
committed
docs: update networking resource documentation
Remove outdated information and some small additions. Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
1 parent bc88de7 commit 6d30c48

File tree

1 file changed

+29
-21
lines changed

1 file changed

+29
-21
lines changed

website/content/v1.1/learn-more/networking-resources.md

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ weight: 70
44
description: "Delve deeper into networking of Talos Linux."
55
---
66

7-
Starting with version 0.11, a new implementation of the network configuration subsystem is powered by [COSI]({{< relref "controllers-resources" >}}).
8-
The new implementation is still using the same machine configuration file format and external sources to configure a node's network, so there should be no difference
9-
in the way Talos works in 0.11.
7+
Talos network configuration subsystem is powered by [COSI]({{< relref "controllers-resources" >}}).
8+
Talos translates network configuration from multiple sources: machine configuration, cloud metadata, network automatic configuration (e.g. DHCP) into COSI resources.
109

11-
The most notable change in Talos 0.11 is that all changes to machine configuration `.machine.network` can be applied now in immediate mode (without a reboot) via
12-
`talosctl edit mc --mode=no-reboot` or `talosctl apply-config --mode=no-reboot`.
10+
Network configuration and network state can be inspected using `talosctl get` command.
11+
12+
Network machine configuration can be modified using `talosctl edit mc` command (also variants `talosctl patch mc`, `talosctl apply-config`) without a reboot.
13+
As API access requires network connection, [`--mode=try`]({{< relref "../talos-guides/configuration/editing-machine-configuration" >}})
14+
can be used to test the configuration with automatic rollback to avoid losing network access to the node.
1315

1416
## Resources
1517

@@ -65,8 +67,8 @@ accordingly.
6567

6668
Additional details about the address can be accessed via the YAML output:
6769

68-
```sh
69-
$ talosctl get address eth0/172.20.0.2/24 -o yaml
70+
```yaml
71+
# talosctl get address eth0/172.20.0.2/24 -o yaml
7072
node: 172.20.0.2
7173
metadata:
7274
namespace: network
@@ -99,8 +101,8 @@ NODE NAMESPACE TYPE ID VERSION RESOLVERS
99101
172.20.0.2 network ResolverStatus resolvers 2 ["8.8.8.8","1.1.1.1"]
100102
```
101103

102-
```sh
103-
$ talosctl get links -o yaml
104+
```yaml
105+
# talosctl get links -o yaml
104106
node: 172.20.0.2
105107
metadata:
106108
namespace: network
@@ -151,8 +153,8 @@ from multiple configuration sources (see a section below for details).
151153

152154
If a `*Spec` resource is queried in YAML format, some additional information is available:
153155

154-
```sh
155-
$ talosctl get addressspecs eth0/172.20.0.2/24 -o yaml
156+
```yaml
157+
# talosctl get addressspecs eth0/172.20.0.2/24 -o yaml
156158
node: 172.20.0.2
157159
metadata:
158160
namespace: network
@@ -185,8 +187,8 @@ Spec resources in the `network-config` namespace are merged with conflict resolu
185187
Let's take `HostnameSpec` as an example.
186188
The final merged representation is:
187189

188-
```sh
189-
$ talosctl get hostnamespec -o yaml
190+
```yaml
191+
# talosctl get hostnamespec -o yaml
190192
node: 172.20.0.2
191193
metadata:
192194
namespace: network
@@ -217,8 +219,8 @@ NODE NAMESPACE TYPE ID VERSION HOSTNAME
217219

218220
Initial configuration for the hostname in the `network-config` namespace is:
219221

220-
```sh
221-
$ talosctl get hostnamespec -o yaml --namespace network-config
222+
```yaml
223+
# talosctl get hostnamespec -o yaml --namespace network-config
222224
node: 172.20.0.2
223225
metadata:
224226
namespace: network-config
@@ -264,7 +266,7 @@ Here is the order of precedence from low to high:
264266
* `operator` (various dynamic configuration options: DHCP, Virtual IP, etc);
265267
* `configuration` (derived from the machine configuration).
266268

267-
So in our example the `operator` layer `HostnameSpec` overwrites the `default` layer producing the final hostname `talos-default-master-1`.
269+
So in our example the `operator` layer `HostnameSpec` overrides the `default` layer producing the final hostname `talos-default-master-1`.
268270

269271
The merge process applies to all six core networking specs.
270272
For each spec, the `layer` controls the merge behavior
@@ -287,8 +289,8 @@ Network operators produce specs for addresses, routes, links, etc., which are th
287289
Operators are configured with `OperatorSpec` resources which describe when operators
288290
should run and additional configuration for the operator:
289291

290-
```sh
291-
$ talosctl get operatorspecs -o yaml
292+
```yaml
293+
# talosctl get operatorspecs -o yaml
292294
node: 172.20.0.2
293295
metadata:
294296
namespace: network
@@ -351,8 +353,8 @@ Depending on the machine configuration `nodename` might be just a hostname or th
351353

352354
`NetworkStatus` aggregates the current state of the network configuration:
353355

354-
```sh
355-
$ talosctl get networkstatus -o yaml
356+
```yaml
357+
# talosctl get networkstatus -o yaml
356358
node: 10.100.2.23
357359
metadata:
358360
namespace: network
@@ -398,16 +400,22 @@ There are several configuration sources for the network configuration, which are
398400

399401
### Cmdline
400402

401-
The kernel command line is parsed for the following options:
403+
The kernel [command line]({{< relref "../reference/kernel" >}}) is parsed for the following options:
402404

403405
* `ip=` option is parsed for node IP, default gateway, hostname, DNS servers, NTP servers;
406+
* `bond=` option is parsed for bonding interfaces and their options;
404407
* `talos.hostname=` option is used to set node hostname;
405408
* `talos.network.interface.ignore=` can be used to make Talos skip network interface configuration completely.
406409

407410
### Platform
408411

409412
Platform configuration delivers cloud environment-specific options (e.g. the hostname).
410413

414+
Platform configuration is specific to the environment metadata: for example, on Equinix Metal, Talos automatically
415+
configures public and private IPs, routing, link bonding, hostname.
416+
417+
Platform configuration is cached across reboots in `/system/state/platform-network.yaml`.
418+
411419
### Operator
412420

413421
Network operators provide configuration for all basic resource types.

0 commit comments

Comments
 (0)