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.
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:
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.
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.
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.
kubectl is configured to work with
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:
Additional controllers can be installed by following the respective installation instructions provided in the KNE documentation.
srl-controller is installed successfully, it can be seen in its namespace as a deployment:
The same lab can be used with unlicensed IXR-D/H variants; to adapt the lab to unlicensed SR Linux variants users need to:
model: "ixr6e"string from the KNE topology file
remove the openconfig configuration blob from the startup-config file
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: