4

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

 1 year ago
source link: https://www.infoq.com/news/2023/03/kwok-kubernetes/?itm_source=infoq&itm_medium=popular_widget&itm_campaign=popular_content_list&itm_content=
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

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

Mar 19, 2023 1 min read

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:

5image1-1678972660492.jpg

          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.

1FqNKny1X0AEwc8P-1678972927800.jpg

         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

Claudio Masolo

Claudio is a cloud engineer. In his spare time, he likes running, reading, and playing old video games.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK