Skip to content

Megalos (Kathara over Kubernetes)

Mariano Scazzariello edited this page Jul 21, 2023 · 2 revisions

Starting from version 3.0.0, Kathará officially supports Kubernetes as a backend virtualization system. Unfortunately, due to some design decisions and compatibility issues there are a few differences when deploying a network scenario on Kubernetes.

Differences between Kathará and Megalos

  • Collision domain names cannot be more than 4 characters length.
  • The network interfaces defined for a specific device are called netX instead of ethX. Moreover, each device has an eth0 interface used by Kubernetes to communicate with that device (check its deployment status, heartbeats, etc.). ANY change made to the eth0 interface will cause a device failure, with a deletion and a re-schedule.
  • When a routing daemon is used, the eth0 network interface MUST be disabled inside the routing daemon. Moreover, the Kubernetes Pods subnet must be denied. Here you can find an example on how to acheive this using Quagga:
router ospf (or rip)
passive-interface eth0
!
! AFTER NETWORK AND REDISTRIBUTE SECTIONS
!
distribute-list noeth0 out kernel
!
access-list noeth0 deny XX.YY.ZZ.KK/AA = Kubernetes Pods Subnet (e.g. 172.0.0.0/8)
access-list noeth0 permit any
!
  • The hosthome directory is not mounted.
  • The shared directory is bound to the host directory /home/shared of the worker node where a device is running. Hence, the directory content will be different if the same device is scheduled in another worker node.
  • Inside a network scenario, the .tar.gz of a device directory must not exceed 3MB. Notice that the .tar.gz is automatically created by Kathará and will raise a dedicated exception if it is bigger than 3MB.
  • Unlike Kathará, when a network scenario is deployed, terminals are not automatically opened. To connect to a device shell, use kathara connect command.
  • The .startup file MUST always return with exit code 0. This means that blocking applications must not be launched in foreground. Use Bash operator & to launch them in background.

Using Kathará with Kubernetes

  • Install the Megalos CNI on your Kubernetes cluster.
  • If Kathará is not installed in the master node, use kathara settings to setup a remote connection with the Kubernetes API Server (URL and API Key are required).
  • Start playing with your network scenarios.
Clone this wiki locally