Skip to content

Installation#

Clabernetes runs on a Kubernetes cluster and hence requires one to be available before you start your Clabernetes journey. Although we don't have a strict requirement on the k8s version, we recommend using the version 1.21 or higher.

Clabernetes project consists of two components:

  • Clabernetes manager (a.k.a. controller) - a k8s controller that watches for the Clabernetes topology resources and deploys them to the cluster.
  • Clabverter - a CLI tool that converts containerlab topology files into Clabernetes topology resources.

Clabernetes Manager#

Clabernetes manager (a.k.a. controller) is packaged as a Helm chart; this means if you don't have Helm - install it or use it in a container packaging:

alias helm='docker run --network host -ti --rm -v $(pwd):/apps -w /apps \
    -v ~/.kube:/root/.kube -v ~/.helm:/root/.helm \
    -v ~/.config/helm:/root/.config/helm \
    -v ~/.cache/helm:/root/.cache/helm \
    alpine/helm:3.12.3'

GKE clusters require [gke-gcloud-auth-plugin][gke-auth-plugin] to be available. Make sure you have it installed and mounted into the container.

alias helm='docker run --network host -ti --rm -v $(pwd):/apps -w /apps \
    -v /usr/bin/gke-gcloud-auth-plugin:/usr/bin/gke-gcloud-auth-plugin \
    -v ~/.kube:/root/.kube -v ~/.helm:/root/.helm \
    -v ~/.config/helm:/root/.config/helm \
    -v ~/.cache/helm:/root/.cache/helm \
    alpine/helm:3.12.3'

With Helm installed, proceed to install the Clabernetes manager.

To install the latest Clabernetes release with Helm to an existing k8s cluster1 run the following command:

helm upgrade --install --create-namespace --namespace c9s \
    clabernetes oci://ghcr.io/srl-labs/clabernetes/clabernetes

To upgrade to the latest version re-run the installation command and the latest version will be installed on the cluster replacing the older running version.

To install a specific clabernetes version add --version flag like so:

helm upgrade --version 0.0.25 --install \
    clabernetes oci://ghcr.io/srl-labs/clabernetes/clabernetes

Clabernetes iterates fast, and you might want to try the latest development version until we cut a release. To do so, use the 0.0.0 version:

helm upgrade --install --version 0.0.0 --create-namespace --namespace c9s \
    --set manager.managerLogLevel=debug \
    --set manager.controllerLogLevel=debug \
    --set manager.imagePullPolicy=Always \
    --set globalConfig.deployment.launcherImagePullPolicy=Always \
    --set globalConfig.deployment.launcherLogLevel=debug \
    clabernetes oci://ghcr.io/srl-labs/clabernetes/clabernetes

We also set the log level to debug for all the components to see more verbose logs. Trust us, you might need it 😄

To uninstall clabernetes from the cluster:

helm uninstall --namespace c9s clabernetes

Clabverter#

What a name, huh? Clabverter is a helper CLI tool that takes your existing containerlab topology converts it to a Clabernetes topology resource and applies it to the cluster.

Clabverter is versioned in the same way as Clabernetes, and the easiest way to use it is by leveraging the container image2:

set up clabverter alias
alias clabverter='sudo docker run --user $(id -u) \
    -v $(pwd):/clabernetes/work --rm \
    ghcr.io/srl-labs/clabernetes/clabverter'

In case you need to install a specific version:

alias clabverter='sudo docker run --user $(id -u) \
    -v $(pwd):/clabernetes/work --rm \
    ghcr.io/srl-labs/clabernetes/clabverter:0.0.22'

To use the latest development version of clabverter:

alias clabverter='sudo docker run --pull always --user $(id -u) \
    -v $(pwd):/clabernetes/work --rm \
    ghcr.io/srl-labs/clabernetes/clabverter:dev-latest'

  1. Want to quickly spin up a local k8s cluster with clabernetes? Check out our Quickstart

  2. You already have Docker installed if you use containerlab, right?