kwok

module
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2024 License: Apache-2.0

README

KWOK (Kubernetes WithOut Kubelet)

KWOK is pronounced as /kwɔk/.

KWOK is a toolkit that enables setting up a cluster of thousands of Nodes in seconds. Under the scene, all Nodes are simulated to behave like real ones, so the overall approach employs a pretty low resource footprint that you can easily play around on your laptop.

What is KWOK?

KWOK stands for Kubernetes WithOut Kubelet. So far, it provides two tools:

  • kwok is the cornerstone of this project, responsible for simulating the lifecycle of fake nodes, pods, and other Kubernetes API resources.
  • kwokctl is a CLI tool designed to streamline the creation and management of clusters, with nodes simulated by kwok.

Please see our website for more in-depth information.

Why KWOK?

  • Lightweight: You can simulate thousands of nodes on your laptop without significant consumption of CPU or memory resources. Currently, KWOK can reliably maintain 1k nodes and 100k pods easily.
  • Fast: You can create and delete clusters and nodes almost instantly, without waiting for boot or provisioning. Currently, KWOK can create 20 nodes or pods per second.
  • Compatibility: KWOK works with any tools or clients that are compliant with Kubernetes APIs, such as kubectl, helm, kui, etc.
  • Portability: KWOK has no specific hardware or software requirements. You can run it using pre-built images, once Docker or Nerdctl is installed. Alternatively, binaries are also available for all platforms and can be easily installed.
  • Flexibility: You can configure different node types, labels, taints, capacities, conditions, etc., and you can configure different pod behaviors, status, etc. to test different scenarios and edge cases.

Community

See our own contributor guide and the Kubernetes community page.

Getting Involved

If you're interested in participating in future discussions or development related to KWOK, there are several ways to get involved:

Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.

Directories

Path Synopsis
cmd
kwok
Package main is the entry point for the kwok binary.
Package main is the entry point for the kwok binary.
kwokctl
Package main is the entry point for the kwokctl binary.
Package main is the entry point for the kwokctl binary.
hack
gen_cmd_docs
Package main is a tool to generate the documentation for the kwok and kwokctl commands.
Package main is a tool to generate the documentation for the kwok and kwokctl commands.
test_stage
Package main implements a simple stage tester.
Package main implements a simple stage tester.
verify_boilerplate
Package main implements a simple boilerplate checker.
Package main implements a simple boilerplate checker.
kustomize
crd
Package crd contains the default stages for CRD.
Package crd contains the default stages for CRD.
kwokctl/resource
Package resource contains node and pod resource for kwokctl.
Package resource contains node and pod resource for kwokctl.
stage/node/fast
Package fast contains the fast node for kwok.
Package fast contains the fast node for kwok.
stage/node/heartbeat
Package heartbeat contains the node heartbeat for kwok.
Package heartbeat contains the node heartbeat for kwok.
stage/node/heartbeat-with-lease
Package heartbeat_with_lease contains the node heartbeat with lease for kwok.
Package heartbeat_with_lease contains the node heartbeat with lease for kwok.
stage/pod/fast
Package fast contains the fast pod for kwok.
Package fast contains the fast pod for kwok.
pkg
apis
Package apis contains API Schema definitions
Package apis contains API Schema definitions
apis/action/v1alpha1
Package v1alpha1 implements the v1alpha1 apiVersion of kwokctl's action
Package v1alpha1 implements the v1alpha1 apiVersion of kwokctl's action
apis/config/v1alpha1
Package v1alpha1 implements the v1alpha1 apiVersion of kwok's configuration
Package v1alpha1 implements the v1alpha1 apiVersion of kwok's configuration
apis/internalversion
Package internalversion implements the internal apiVersion of kwok's configuration
Package internalversion implements the internal apiVersion of kwok's configuration
apis/v1alpha1
Package v1alpha1 implements the v1alpha1 apiVersion of kwok's configuration
Package v1alpha1 implements the v1alpha1 apiVersion of kwok's configuration
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/apis/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/apis/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
config
Package config provides utilities to get configuration.
Package config provides utilities to get configuration.
config/resources
Package resources contains utility functions for serving resources.
Package resources contains utility functions for serving resources.
consts
Package consts defines the constants for building the project.
Package consts defines the constants for building the project.
kwok/cmd
Package cmd defines a root command for the kwok.
Package cmd defines a root command for the kwok.
kwok/cni
Package cni provides the core logic to call CNI.
Package cni provides the core logic to call CNI.
kwok/controllers
Package controllers is the package that contains the core logic on pods and nodes simulation.
Package controllers is the package that contains the core logic on pods and nodes simulation.
kwok/metrics
Package metrics implements the metrics server.
Package metrics implements the metrics server.
kwok/server
Package server contains the kwok server.
Package server contains the kwok server.
kwokctl/cmd
Package cmd defines a root command for the kwokctl.
Package cmd defines a root command for the kwokctl.
kwokctl/cmd/config
Package config provides the kwokctl config command.
Package config provides the kwokctl config command.
kwokctl/cmd/config/reset
Package reset provides the kwokctl config reset command.
Package reset provides the kwokctl config reset command.
kwokctl/cmd/config/tidy
Package tidy provides a command to tidy the config file
Package tidy provides a command to tidy the config file
kwokctl/cmd/config/view
Package view provides the kwokctl config view command.
Package view provides the kwokctl config view command.
kwokctl/cmd/create
Package create defines a parent command for cluster creation.
Package create defines a parent command for cluster creation.
kwokctl/cmd/create/cluster
Package cluster contains a command to create a cluster.
Package cluster contains a command to create a cluster.
kwokctl/cmd/delete
Package delete defines a parent command for cluster deletion.
Package delete defines a parent command for cluster deletion.
kwokctl/cmd/delete/cluster
Package cluster contains a command to delete a cluster.
Package cluster contains a command to delete a cluster.
kwokctl/cmd/etcdctl
Package etcdctl provides a method for users to use the etcdctl binary in a cluster.
Package etcdctl provides a method for users to use the etcdctl binary in a cluster.
kwokctl/cmd/export
Package export implements the `export` command
Package export implements the `export` command
kwokctl/cmd/export/logs
Package logs implements the `logs` command
Package logs implements the `logs` command
kwokctl/cmd/get
Package get defines a parent command for getting artifacts, clusters and kubeconfig.
Package get defines a parent command for getting artifacts, clusters and kubeconfig.
kwokctl/cmd/get/artifacts
Package artifacts contains a command to list binaries or images used by a cluster.
Package artifacts contains a command to list binaries or images used by a cluster.
kwokctl/cmd/get/clusters
Package clusters contains a command to list existing clusters.
Package clusters contains a command to list existing clusters.
kwokctl/cmd/get/components
Package components contains a command to list existing components.
Package components contains a command to list existing components.
kwokctl/cmd/get/kubeconfig
Package kubeconfig contains a command to prints cluster kubeconfig
Package kubeconfig contains a command to prints cluster kubeconfig
kwokctl/cmd/hack
Package hack defines a parent command for hack data
Package hack defines a parent command for hack data
kwokctl/cmd/hack/del
Package del defines a command to delete data in etcd
Package del defines a command to delete data in etcd
kwokctl/cmd/hack/get
Package get defines a command to get data in etcd
Package get defines a command to get data in etcd
kwokctl/cmd/hack/put
Package put defines a command to put data in etcd
Package put defines a command to put data in etcd
kwokctl/cmd/kubectl
Package kubectl contains a command to use the kubectl in a cluster.
Package kubectl contains a command to use the kubectl in a cluster.
kwokctl/cmd/logs
Package logs contains a command to log a component of a cluster.
Package logs contains a command to log a component of a cluster.
kwokctl/cmd/scale
Package scale contains a command to scale a resource in a cluster.
Package scale contains a command to scale a resource in a cluster.
kwokctl/cmd/snapshot
Package snapshot contains a parent command which snapshots one of cluster.
Package snapshot contains a parent command which snapshots one of cluster.
kwokctl/cmd/snapshot/export
Package export is the export of external cluster
Package export is the export of external cluster
kwokctl/cmd/snapshot/record
Package record provides a command to record the recording of a cluster.
Package record provides a command to record the recording of a cluster.
kwokctl/cmd/snapshot/replay
Package replay provides a command to replay the recordingof a cluster.
Package replay provides a command to replay the recordingof a cluster.
kwokctl/cmd/snapshot/restore
Package restore provides a command to restore the snapshot of a cluster.
Package restore provides a command to restore the snapshot of a cluster.
kwokctl/cmd/snapshot/save
Package save provides a command to save the snapshot of a cluster.
Package save provides a command to save the snapshot of a cluster.
kwokctl/cmd/start
Package start implements the start command
Package start implements the start command
kwokctl/cmd/start/cluster
Package cluster implements the start cluster command
Package cluster implements the start cluster command
kwokctl/cmd/stop
Package stop implements the stop command
Package stop implements the stop command
kwokctl/cmd/stop/cluster
Package cluster implements the stop cluster command
Package cluster implements the stop cluster command
kwokctl/components
Package components contains some helper functions related to the components.
Package components contains some helper functions related to the components.
kwokctl/dryrun
Package dryrun provides a way to print commands instead of running them.
Package dryrun provides a way to print commands instead of running them.
kwokctl/etcd
Package etcd provides a method for operators the data in etcd.
Package etcd provides a method for operators the data in etcd.
kwokctl/k8s
Package k8s contains some helper functions related to the Kubernetes.
Package k8s contains some helper functions related to the Kubernetes.
kwokctl/pki
Package pki is the package that provides functions to generate certificates
Package pki is the package that provides functions to generate certificates
kwokctl/recording
Package recording provides utilities for recording and replaying.
Package recording provides utilities for recording and replaying.
kwokctl/runtime
Package runtime defines the interface of a cluster operation and providers a register method.
Package runtime defines the interface of a cluster operation and providers a register method.
kwokctl/runtime/binary
Package binary implements the runtime.Runtime interface using the binaries.
Package binary implements the runtime.Runtime interface using the binaries.
kwokctl/runtime/compose
Package compose implements the runtime.Runtime interface using the image.
Package compose implements the runtime.Runtime interface using the image.
kwokctl/runtime/kind
Package kind implements the runtime.Runtime interface using the kind.
Package kind implements the runtime.Runtime interface using the kind.
kwokctl/runtime/kind/config/kind/v1alpha4
Package v1alpha4 copy from https://github.com/kubernetes-sigs/kind/blob/master/pkg/apis/config/v1alpha4/types.go
Package v1alpha4 copy from https://github.com/kubernetes-sigs/kind/blob/master/pkg/apis/config/v1alpha4/types.go
kwokctl/runtime/kind/config/kubeadm/v1beta3
Package v1beta3 copy from https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/apis/kubeadm/v1beta3/types.go
Package v1beta3 copy from https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/apis/kubeadm/v1beta3/types.go
kwokctl/scale
Package scale is the scale of cluster
Package scale is the scale of cluster
kwokctl/snapshot
Package snapshot is the snapshot of cluster
Package snapshot is the snapshot of cluster
log
Package log wrappers slog for the kwok and kwokctl
Package log wrappers slog for the kwok and kwokctl
tools/stage
Package stage provides a stage tester.
Package stage provides a stage tester.
utils/cel
Package cel implements a environment for the Common Expression Language (CEL).
Package cel implements a environment for the Common Expression Language (CEL).
utils/client
Package client is the client for kubeconfig
Package client is the client for kubeconfig
utils/envs
Package envs provides utilities to get environment variables.
Package envs provides utilities to get environment variables.
utils/exec
Package exec provides utilities to execute commands.
Package exec provides utilities to execute commands.
utils/expression
Package expression provides utilities to evaluate expressions.
Package expression provides utilities to evaluate expressions.
utils/file
Package file contains utilities for operating on files.
Package file contains utilities for operating on files.
utils/format
Package format contains utilities for formatting data.
Package format contains utilities for formatting data.
utils/gotpl
Package gotpl provides a template renderer.
Package gotpl provides a template renderer.
utils/heap
Package heap provides a generic heap implementation.
Package heap provides a generic heap implementation.
utils/image
Package image provides utilities for working with container images.
Package image provides utilities for working with container images.
utils/informer
Package informer provides a generic mechanism for listening for changes to resources.
Package informer provides a generic mechanism for listening for changes to resources.
utils/kubeconfig
Package kubeconfig provides utilities to manipulate kubeconfig.
Package kubeconfig provides utilities to manipulate kubeconfig.
utils/lifecycle
Package lifecycle provides utilities to manipulate lifecycle of resources.
Package lifecycle provides utilities to manipulate lifecycle of resources.
utils/maps
Package maps provides utilities to manipulate maps.
Package maps provides utilities to manipulate maps.
utils/monospace
Package monospace provides functions to work with monospace fonts.
Package monospace provides functions to work with monospace fonts.
utils/net
Package net contains utilities for manipulating network.
Package net contains utilities for manipulating network.
utils/patch
Package patch provides a simple wrapper around the strategic merge patch
Package patch provides a simple wrapper around the strategic merge patch
utils/path
Package path contains utilities for manipulating file paths.
Package path contains utilities for manipulating file paths.
utils/pools
Package pools provides a generic pool implementation.
Package pools provides a generic pool implementation.
utils/printers
Package printers contains utilities for printing.
Package printers contains utilities for printing.
utils/progressbar
Package progressbar provides a transport that writes a progress bar to out.
Package progressbar provides a transport that writes a progress bar to out.
utils/queue
Package queue provides a generic queue implementation.
Package queue provides a generic queue implementation.
utils/sets
Package sets provides utilities to manipulate sets.
Package sets provides utilities to manipulate sets.
utils/signals
Package signals is the package that provide helper functions to receive signals from the system.
Package signals is the package that provide helper functions to receive signals from the system.
utils/slices
Package slices provides utilities to manipulate slices.
Package slices provides utilities to manipulate slices.
utils/tail
Package tail provides utilities to tail lines.
Package tail provides utilities to tail lines.
utils/version
Package version provides a simple way to parse versions.
Package version provides a simple way to parse versions.
utils/wait
Package wait provides tools for polling or listening for changes
Package wait provides tools for polling or listening for changes
utils/yaml
Package yaml provides tools for encoding and decoding YAML.
Package yaml provides tools for encoding and decoding YAML.
test
e2e
Package e2e is a test package for e2e test.
Package e2e is a test package for e2e test.
e2e/helper
Package helper provides tools for e2e test.
Package helper provides tools for e2e test.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL