Quickstart

This quickstart guide walks through steps of creating a simple lab, introduces some key concepts along the way.

1. install KNL

2. creates a lab.yaml

This file defines a lab named quickstart contains two SRLinux nodes, using 25.10.1 release image.

apiVersion: knl.kubenetlab.net/v1beta1
kind: Lab
metadata:
  name: quickstart
  namespace: knl-system
spec:
  nodes:
    srl-2:
      srl:
        image: ghcr.io/nokia/srlinux:25.10.1
        chassis: ixr-d2l
  links:
    link1:
      nodes:
      - node: srl-1
      - node: srl-2

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-2 and its type is srl, along with image and chassis specification.
    • node name must have the prefix: <nodeType>-, like srl-1 means it is a SRLinux node; see list of supported node types in Node Types

    • the actual configruation depends on node type, see corresponding type guide under Node Types section.

    • certain per node configuration are optional like memory in SRLinux case, the default value are specified in KNLConfig CR.

    • Note

      Note
      node srl-1 is not defined in nodes section, which means it will use default configuration provided by KNLConfig CR.

  • links: defines how nodes are connected, it is a map: key is a link name while value is the specification of the link, nodes is 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:

knlcli create lab.yaml

Or use kubectl:

kubectl apply -f lab.yaml

4. check the created lab

user@svr-1:~$ knlcli show
Lab            Ready   Msg
quickstart     true    all nodes are ready

user@svr-1:~$ knlcli show -v
quickstart:
  Node    Type   Chassis   Pods               PodReady   Worker/PodIP
  srl-1   SRL    ixr-d3l   quickstart-srl-1   True       worker-2/10.244.0.86
  srl-2   SRL    ixr-d2l   quickstart-srl-2   True       worker-1/10.244.1.125

  Link    Nodes   Port
  link1   srl-1
          srl-2

or use kubectl

kubectl -n knl-system get labs
NAME           READY   MSG
quickstart     True    all nodes are ready

user@svr-1:~$  kubectl -n knl-system get lab quickstart -o yaml
kubectl -n knl-system describe labs.knl.kubenetlab.net quickstart
Name:         quickstart
Namespace:    knl-system
Labels:       <none>
Annotations:  <none>
API Version:  knl.kubenetlab.net/v1beta1
Kind:         Lab
Metadata:
  Creation Timestamp:  2026-03-29T19:09:22Z
  Finalizers:
    lab.kubenetlab.net/finalizer
  Generation:        1
  Resource Version:  154113385
  UID:               75e499ac-55a2-46ca-9600-6120e71f9d06
Spec:
  Links:
    link1:
      Nodes:
        Mac:   12:20:22:00:00:01
        Node:  srl-1
        Mac:   12:20:22:00:00:02
        Node:  srl-2
  Nodes:
    srl-1:
      Srl:
        Chassis:  ixr-d3l
        Image:    ghcr.io/nokia/srlinux:26.3
        License:  srl26.3
        Memory:   4Gi
    srl-2:
      Srl:
        Chassis:  ixr-d2l
        Image:    ghcr.io/nokia/srlinux:25.10.1
        License:  srl26.3
        Memory:   4Gi
Status:
  Conditions:
    Last Transition Time:  2026-03-29T19:09:23Z
    Message:               lab ensured
    Reason:                ensured
    Status:                True
    Type:                  Deployed
    Last Transition Time:  2026-03-29T19:11:02Z
    Message:               all nodes are ready
    Reason:                running
    Status:                True
    Type:                  Ready
Events:                    <none>
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!.

user@svr-1:~$ knlcli shell quickstart srl-1
connecting to srl-1 at 10.244.0.86 username admin
Warning: Permanently added '10.244.0.86' (ED25519) to the list of known hosts.
(admin@10.244.0.86) Password:
Loading environment configuration file(s): ['/etc/opt/srlinux/srlinux.rc']
Welcome to the Nokia SR Linux CLI.

--{ [FACTORY] + running }--[  ]--
A:admin@quickstart-srl-1#

For a non-interactive check, use knlcli exec quickstart srl-1 "show version". or use ssh command with corresponding pod IP directly:

ssh admin@10.244.0.86

6. remove the lab

use knlcli

knlcli remove quickstart 

or use kubectl

kubectl -n knl-system delete lab quickstart
Note

Note
removing a lab won’t remove the persistent part of the lab, like its data volume or PVC