Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Kwok, a Tool to Spin up Kubernetes Nodes in a Second

Kwok, a Tool to Spin up Kubernetes Nodes in a Second

Kubernetes community announces the availability of Kwok, a toolkit to set up a Kubernetes cluster of thousands of nodes in seconds. All the nodes are simulated, in this way, the fake cluster has a low resource footprint and can be up and running on a laptop. This tool is developed to test Kubernetes controllers at scale without spinning up any portion of the infrastructure.

Kwok is the acronym of Kubernetes Without Kubelet and is composed of Kwok and Kwokctl. Kwok is responsible for the simulation of the fake nodes, pods, and other Kubernetes resources. Kwokctl is the CLI tool to manage the nodes and cluster simulations.

The use cases of Kwok are: learning Kubernetes concepts and features without real infrastructure. Development of new tools and features without a real cluster and on a developer machine. Measuring how an application or controller can scale with a different number of nodes and pods. Testing high loads with different resource requests or limits for pods and services. Simulating node failures or network partitions. Testing how the controller interacts with other Kubernetes components and features by enabling different feature gates or API versions.

Kwok allows the creation and delete clusters and nodes in seconds and works with any tools or clients that are compliant with Kubernetes API like Kubectl, and Helm. Kwok can be installed on all platforms and doesn’t require specific hardware or software. At the time of writing the runtime and OS support is the following:

          Runtimes indicate which medium Kwokctl uses to start the cluster.

With Kwok it’s possible to configure different node types, capacities, taints, and different pod behaviors, statuses, etc. to test different cases and scenarios. With Kwok is possible to simulate thousands of nodes on the laptop without significant CPU or memory consumption.

         Example of new cluster creation with Kwok.

Kwok has some limitations because is not Kubelet, so may have different behaviors in pods lifecycle management, device plugin, and volume mounting. Another limitation is that Kwok doesn’t accurately reflect the performance of real nodes because it approximates behaviors using simple formulas. Kwok assumes that all the requests from the Kube API server are valid and authorized because does not enforce any security policies or mechanisms on fake nodes.

About the Author

Rate this Article