Applied Computing Research Labs Logo
Open source research and development in distributed systems

SimKube Concepts #

SimKube is designed to allow users to simulate the behaviour of Kubernetes control plane components in a safe, isolated local environment. It is a "record-and-replay" simulator, which means that users can record the behaviour of a production cluster and then save that data for future analysis. Below we describe some of the key concepts of SimKube

What components are simulated? #

Typically when we talk about the Kubernetes control plane, we are talking about the API server, scheduler, and controller manager. SimKube expands this definition to include anything that can impact the behaviour of a cluster, including projects like Cluster Autoscaler, descheduler, and others.

SimKube accomplishes this by running in a cluster with a real control plane; however, all pod behaviours are mocked out using Kubernetes WithOut Kubelet (KWOK). This means that anything that happens inside a pod is effectively out of scope of the simulation. KWOK does have utilities to mock out some aspects of pod lifecycle, but these are not (currently) supported by SimKube. Crucially, this means that simulations that rely on the Horizontal Pod Autoscaler (for example) will not currently work.

Note also that, unlike some simulation solutions, we are not mocking out any aspects of the control plane. This means that simulations of cluster behaviour take place in real-time, and we do not have any hooks into or control over what messages are seen by various control plane components. Thus, running the exact same simulation repeatedly may yield different results on each run, depending on timing fluctuations and other challenges of distributed systems.

How does it work? #

SimKube has a number of components that it uses to record data and run simulations: