Quickstart
This quickstart guide walks through steps of creating a simple lab, introduces some key concepts along the way.
1. install KNL
- Scripts: Install with scripts —
sudo ./scripts/setup-k3s.sh --installafter cloning the knl repo. - Manual path: see Manual install.
2. creates a lab.yaml
This file defines a lab named quickstart contains two SRLinux nodes, using 25.10.1 release image.
There are two parts of a lab defintion:
- nodes: define the configuration for each node in the topology, it is a map: key is the node name while value is the type specific configuration. This YAML specifies a node with name
srl-2and its type issrl, along withimageandchassisspecification.node name must have the prefix:
<nodeType>-, likesrl-1means it is a SRLinux node; see list of supported node types in Node Typesthe actual configruation depends on node type, see corresponding type guide under Node Types section.
certain per node configuration are optional like
memoryin SRLinux case, the default value are specified inKNLConfigCR.Note
Note
nodesrl-1is not defined innodessection, which means it will use default configuration provided byKNLConfigCR.
- links: defines how nodes are connected, it is a map: key is a link name while value is the specification of the link,
nodesis a mandatory part of it, which is a list of node names connects to the same L2 network of the link.
3. create the lab
Either use KNL cli tool knlcli:
Or use kubectl:
4. check the created lab
or use kubectl
Note
Note
the created lab has more configuration than the YAML file (like memory, mac), most of the addtional parts are the default values provided by KNLConfig CR, others like mac are dynamic default values.
5. login into node
Use knlcli shell command to ssh into node srl-1 using default username admin, password is the default SRLinux password NokiaSrl1!.
For a non-interactive check, use knlcli exec quickstart srl-1 "show version".
or use ssh command with corresponding pod IP directly:
6. remove the lab
use knlcli
or use kubectl
Note
Note
removing a lab won’t remove the persistent part of the lab, like its data volume or PVC