๐ฅพ Walk: Deploying Containerlab in Kubernetes with Arista cEOS
๐ฃ If you missed the Crawl phase, start here.
๐งญ What We’re Doing in the Walk Phase
In this post, I’m using clabverter
to deploy a Containerlab topology directly inside Kubernetes โ specifically using Arista cEOS. We’ll walk through converting the topology, deploying it, and validating that everything’s working โ ending with a live, CLI-accessible network device.
โ๏ธ Step 1: Define the Containerlab Topology
Here’s the ceos.lab.yaml
file I used:
name: ceos-lab
topology:
nodes:
ceos1:
kind: ceos
image: registry.digitalocean.com/network-analyzer-lab/ceos:4.33.1F
startup-config: ceos1.cfg
๐ Step 2: Convert and Deploy Using Clabverter
Now, letโs turn that topology into Kubernetes-native resources and deploy it:
clabverter --stdout --naming non-prefixed --topologyFile ./ceos.lab.yaml | kubectl apply -f -
โ ๏ธ You might see a platform mismatch warning (e.g., linux/amd64
vs arm64
) โ it’s safe to ignore if the pod starts successfully.
โ Step 3: Verify the Deployment
Make sure everything came up properly:
kubectl get namespaces
kubectl get topology -n c9s-ceos-lab
kubectl get pods -n c9s-ceos-lab -o wide
Hereโs what I saw in my lab:
> kubectl get ns
NAME STATUS AGE
c9s Active 2d23h
c9s-ceos-lab Active 11s
default Active 3d16h
...
> kubectl get --namespace c9s-ceos-lab topology
NAME KIND AGE READY
ceos-lab containerlab 43s true
> kubectl get pods --namespace c9s-ceos-lab -o wide
NAME READY STATUS RESTARTS AGE IP NODE
ceos1-5dc7cbc78d-rr9qd 1/1 Running 0 10m 10.109.0.28 pool-42jzkx9cx-6s71k
๐ ๏ธ Step 4: Inspect from Inside the Container
Start a shell in the pod:
kubectl exec -it -n c9s-ceos-lab ceos1-XXXXX -- bash
Then inspect the topology:
containerlab inspect
Sample output:
โญโโโโโโโโฌโโโโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโโโโโโโฎ
โ Name โ Kind/Image โ State โ IPv4/6 Address โ
โโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโโโโค
โ ceos1 โ ceos โ running โ 172.20.20.10 โ
โฐโโโโโโโโดโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโโโโโโโฏ
๐ Step 5: SSH Into the cEOS Node
While still inside the container, connect to the actual device:
ssh admin@ceos1
Youโll be prompted for a password โ use the default or whateverโs configured in your startup config.
๐ Step 6: Check gNMI Status
Inside the cEOS CLI, run:
show management api gnmi
Youโll likely see something like:
Enabled: no transports enabled
Perfect โ that means gNMI is not active yet, which gives us a clean slate for the Run phase.
๐ง What We Accomplished in Walk
- Converted a
.lab.yaml
topology into Kubernetes-native resources - Deployed a real Arista cEOS instance inside Kubernetes
- Verified pod and container status with
containerlab inspect
- SSH’d into the emulated device
- Confirmed gNMI is currently disabled โ ready for the next phase
๐ Coming Up: Run
Next up: Weโll enable gNMI on this cEOS node, hook it up to a telemetry collector like gnmic
, and start visualizing live network metrics in a dashboard.
Stay tuned โ weโre about to see the network breathe ๐ก๐