Kubernetes WithOut Kubelet (KWOK)
Hope you’re doing good. Today when I woke up, I came across an interesting library KWOK (Kubernetes WithOut Kubelet). It is quite interesting, so let’s quickly jump in and understand what exactly it is. I’ll share all the references and resources at the end, please explore and share your thoughts for the same.
First of all let’s understand what exactly kubelet is, below image explains it.
As we can see in above image, Kubelet is component which is available on each node and helps orchastrate pods on the node. In short, kubelet is the component which is responsible for management of each pod in a given cluster.
Based on above undertanding, question is, if we remove kubelet then how my cluster will work !! let understand the same in this section.
When we are dealing with thousands of pods, Development and Testing on a cluster becomes bottleneck, in case of speed as well as cost (deploying huge clusters for Dev and Test costs a lot of money to organization). Hence KWOK will be a good fit in Development, Testing and Learning where we are bother about speed and not security. KWOK simulates nodes, pods and other kubernetes resources without actually provisioning them, which means large amount of code and be deployed and tested locally without any expense or delay.
KWOK 0.1.0 started as a migration of two projects – fake-kubelet and fake-k8s, used for testing. KWOK has two tools,
kwok – responsible for simulating nodes, pods and other kubernetes resources.
kwokctl – CLI tool, which can be used for deployment and management of fake cluster and nodes created by kwok.
- KOWK will boost development and testing as it just simulates the actual resources.
- It is supported for most of the platforms and doesn’t have any actual hardware requirement.
- It works with all tools and clients that are compatible with Kubernetes API
- It can simulate thousands of nodes on your laptop without overloading your CPU.
- KWOK simulates actual cluster and it assumes that all requests from kube-apiserver are authorized and valid which makes it very difficult to perform security testing.
- It simulates nodes, pods and other kubernetes resources so it can not provide actual load and performance testing results.
Example use of kwok/kwokctl
KWOK can be a very handy library for Development, Testing and Learning as it’s just simulating actual kubernetes environment and save us a lot of time. They have further plan to release 0.2.0, 0.3.0 to 1.0 with many more features. We can not expect it to reflact actual working of kubelet.