Regular containerlab-managed nodes can be connected to externally managed containers. For instance, users may want to connect Network OS nodes launched by containerlab to some containers that are managed by other container orchestration tools to create advanced topologies.
This connectivity option is enabled by adding nodes of ext-container kind to the topology.
Containerlab doesn't create nodes of type ext-container, it uses those nodes to let users create links to those externally managed containers from the nodes scheduled by containerlab.
The below topology demonstrates how the node named srl created by containerlab can be connected to the external container named external-node1 that is created by some other tool.
By specifying the node external-node1 as part of the containerlab topology, users can use this node name in the links section of the file and create links between containerlab-managed and externally-managed nodes.
Even though External Container nodes are not scheduled by containerlab, it is possible to configure or interact with them using containerlab topology definition options.
For example, when deploying containerlab topology, users can execute commands in the external containers using exec configuration option:
topology:nodes:srl:kind:nokia_srlinuximage:ghcr.io/nokia/srlinuxexternal-node1:kind:ext-containerexec:-ip address add 192.168.0.1/24 dev eth1