Installation#
To start deploying labs orchestrated by KNE a user needs to install kne
command line utility and have a k8s cluster available. Follow KNE setup instructions to install kne
and its dependencies.
Note
In this tutorial, we will leverage kind (Kubernetes in Docker) to stand up a personal k8s installation. Using kind is not a hard requirement but merely an easy and quick way to get a personal k8s cluster.
By following the setup instructions, you should have the following utilities successfully installed:
Cluster deployment#
Once the necessary utilities are installed, proceed with the KNE cluster installation. KNE cluster consists of the following high-level components:
- Kind cluster: A kind-based k8s cluster to allow automated deployment.
- Load Balancer service: An Load Balancer service used in the KNE cluster to allow for external access to the nodes. Supported LB services: MetalLB.
- CNI: configuration of a CNI plugin used in the KNE cluster to layout L2 links between the network nodes deployed in a cluster. Supported CNI plugins: meshnet-cni.
- External controllers: an optional list of external controllers that manage custom resources.
KNE provides a cluster manifest file along with the command to install cluster components using kne deploy
command1.
Warning
Deployment file contains controllers
object that enables automated installation of external controllers, such as srl-controller. Refrain from using this for now and remove SRLinux section from that list. Install srl-controller manually as explained later.
Using kne deploy
and following the cluster deployment instructions, cluster installation boils down to a single command:
- run from the root of the kne repository. Also remove the
The deployment process should finish with the Deployment complete, ready for topology
log message, indicating that every component of a KNE cluster has been successfully deployed. At this point, it is helpful to check that the cluster and its components are running healthy.
Ensure that a kind cluster named kne
is active.
Check that kubectl
is configured to work with kne
cluster:
Ensure that meshnet
CNI is running as a daemonset:
SR Linux controller#
Next step is to install SR Linux controller that provides the necessary APIs for KNE to deploy SR Linux nodes as part of the network topology. SR Linux controller is an open-source project hosted at srl-labs/srl-controller repository and can be easily installed on a k8s cluster as per its installation instructions:
Info
Additional controllers can be installed by following the respective installation instructions provided in the KNE documentation.
When srl-controller
is installed successfully, it can be seen in its namespace as a deployment:
❯ kubectl get deployments -n srlinux-controller
NAME READY UP-TO-DATE AVAILABLE AGE
srlinux-controller-controller-manager 1/1 1 1 12m
License#
If a user intends to run a topology with chassis-based SR Linux nodes2, they must install a valid license.
The same lab can be used with unlicensed IXR-D/H variants; to adapt the lab to unlicensed SR Linux variants users need to:
- delete
model: "ixr6e"
string from the KNE topology file -
remove the openconfig configuration blob from the startup-config file
Image load#
In the case of a kind
cluster, it is advised to load container images to the kind cluster preemptively. Doing so will ensure that necessary images are present in the cluster when KNE creates network topologies.
To load srlinux container image to the kind cluster: