netlab icon indicating copy to clipboard operation
netlab copied to clipboard

Enable use of clab k8s-kind

Open wnagele opened this issue 1 month ago • 15 comments

I've started this work to allow for the use of K8S (Kubernetes) nodes in topologies.

Containerlab does have support for it but it does pose some challenges on how to add it here.

The main challenge I have come across is that you cannot influence the naming of nodes. It does look like this is by design and won't change any time soon. It means that a certain naming pattern has to be followed for this to work.

For now topology configs based on this PR would look like this:

groups:
  unprovisioned:
    members: [ k01-control-plane, k01-worker, k01-worker2 ]
    module: []
    device: linux

nodes:
  k01-control-plane:
    clab:
      kind: k8s-control-plane
  k01-worker:
    clab:
      kind: k8s-worker
  k01-worker2:
    clab:
      kind: k8s-worker

Along with this a k01-config.yml would be needed:

apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
  - role: control-plane
  - role: worker
  - role: worker

I am sure there is probably better ways to do this, but I am not familiar enough with the concepts here to suggest. Feel free to criticise or change as you see fit.

wnagele avatar Nov 25 '25 20:11 wnagele