Kerberos Agent Deployment

Deploying Kerberos Agent on the edge node to process video streams from Dahua cameras

Kerberos Agent Deployment

Now let's talk about the Kerberos Agent — this is where the magic happens. The Kerberos Agent is an isolated and scalable video management agent with a strong focus on user experience, scalability, resilience, extension, and integration. It's the backbone of the entire Kerberos.io ecosystem, and is used as a foundation for small deployments to production-level deployments with thousands of cameras.

What is a Kerberos Agent?

By now you'll understand that Kerberos.io applies the concept of agents. An agent runs next to (or on) your camera and processes a single camera feed. It applies motion-based or continuous recording and makes those recordings available through a user-friendly web interface. A Kerberos Agent allows you to connect to other cloud services or integrate with custom applications.

Loading image...

Deploying Kerberos Agent on Edge Node

Before we deploy the agent, I need to mention something important: for this demo, I don't have a real camera to test with. So I'm going to show you how I set up a fake camera for testing purposes.

Fake Camera Setup

This is a lab environment, so I'm simulating a camera using FFmpeg. In production, you'd be connecting to real IP cameras via RTSP.


Setting Up a Fake Camera for Testing

Since I don't have a real camera, I need to simulate a live RTSP stream that the Kerberos Agent can consume. Here's my approach:

The idea: The Kerberos Agent will fetch any RTSP stream provided by a camera. I'm going to fake that using FFmpeg.

The setup:

  • We'll use a video file (thiefinhouse.mp4) as the source
  • On the edge node (node-site-tunis-1), this video file will be mounted into a container
  • The container will run FFmpeg, looping the video and serving it via RTSP at a given port

For fun, I'll be using this video:

Loading video...

The Kerberos Agent can then connect to this RTSP URL as if it were a real camera.

Fake Camera Goal

In short: "Create a fake RTSP camera in Kubernetes using FFmpeg and a local video file so the Kerberos Agent can consume it."


Step 1: Prepare the Video File

Let's set up the fake camera. First, I'll prepare the video file on the edge node:

Prepare Video File on Edge Node
$
Video Ready

Perfect! The video file is now ready. Now let's create the fake camera deployment.


Step 2: Create Namespace and Label Node

Before deploying the fake camera, I need to create a namespace and label the edge node:

Setup Namespace and Node Labeling
$
Node Labeling Strategy

By labeling the node with node-role=fake-camera, I can ensure that both the fake camera and the Kerberos Agent will be scheduled on the edge node (node-site-tunis-1), mimicking the real-world scenario where cameras are located at the edge.


Step 3: Deploy the Fake Camera

Now I'll create the deployment manifest for the fake camera. This uses MediaMTX as an RTSP server and FFmpeg to stream the video file:

How This Works

The deployment uses two containers:

  • MediaMTX: Acts as the RTSP server, listening on port 8554
  • FFmpeg: Streams the video file in a loop to the RTSP server

The video file is mounted from the host path /home/ubuntu/fake-camera into the container, so FFmpeg can access it.

Apply the manifest:

Deploy Fake Camera
$

Step 4: Test the Fake Camera

Now let's verify that the fake camera is working properly. To test this, I:

  1. Connected my host PC (the one running the Multipass VMs) to Tailscale using the same account, so I can reach both the master and the edge node
  2. Used VLC to listen for the RTSP feed
Accessing the RTSP Stream

Since the service is type NodePort, I can access it using the Tailscale IP of the edge node. In my case, I used: rtsp://100.70.53.105:31800/demo

Loading image...

And there it is — I can see my camera stream! There's a thief in the house!

Loading image...
Fake Camera Working

Perfect! The fake camera is up and running. Now we can move on to deploying the Kerberos Agent.


Step 5: Deploy Kerberos Agent

Now let's focus on deploying the Kerberos Agent. For more details about deploying Kerberos Agent on Kubernetes, check the official documentation. For our lab environment, I'm going to customize things to align with our setup.

Here's the deployment manifest I'm using:

Key Configuration Points
  • Node Selector: Forces the agent to run on the edge node (node-site-tunis-1)
  • RTSP URL: Points to our fake camera service: rtsp://fake-camera-svc:8554/demo
  • Hub Keys: These are placeholders for now — we'll configure proper Hub integration later

Apply the deployment:

Deploy Kerberos Agent
$

Step 6: Verify Agent is Working

Let's check the agent pod logs to make sure everything is working:

Check Agent Pod Logs
$
Loading image...
About the Microphone Error

You might notice an error in the logs about the camera microphone. This is actually the Kerberos Agent trying to get the microphone from the camera — but remember, it's a fake camera! 😄 The agent is working perfectly; it's just that our fake camera doesn't have a microphone.


Step 7: Access the Agent UI

Now I can connect to the agent UI (used for local on-site configuration if needed). The default username and password are root / root.

Loading image...
Agent is Live!

Perfect! Our "thief" is live! The agent is successfully processing the video stream and making it available through the web interface.


Advanced Features

This opens up a vast range of possibilities and features for configuration:

  • Motion Detection Models — Set up AI-powered motion detection
  • Recognition Models — Implement object and person recognition
  • Kafka Integration — Trigger events from Kafka topics for external processing
  • Region of Interest (ROI) — Define specific areas where motion should be tracked

Setting Up Region of Interest

For example, we can set up Region of Interest in the Kerberos Agent. By defining one or more regions, motion will be tracked only in the regions you have defined.

Loading image...
Smart Alerts

Now we get alerted before that thief enters the windows or doors! This is just one example of the powerful features available in Kerberos Agent.


Summary

At this point, we've successfully:

  • ✅ Set up a fake camera using FFmpeg and MediaMTX
  • ✅ Deployed the Kerberos Agent on the edge node
  • ✅ Verified the agent is processing the video stream
  • ✅ Accessed the agent UI for configuration
Ready for Next Steps

The agent is now running and processing video streams. We can move to the next step: deploying the Kerberos Factory and going further with the complete platform setup.

The Kerberos Agent is the foundation that processes video at the edge. In the next document, I'll show you how to deploy Kerberos Factory to orchestrate multiple agents and manage them centrally from the cloud.