This page describes the high-level architecture of a K2s cluster, the supporting tools bundled with the distribution, and the internal module structure.
High-Level Architecture
A K2s default cluster runs on a single Windows host with a Linux VM acting as the Kubernetes control plane:
Flannel CNI with host-gateway mode — routes pod traffic directly through host routing tables for maximum performance and simplicity. A VXLAN backend template is also available.
Mixed OS support — Windows containers run on the host via containerd; Linux containers run in the VM via CRI-O.
Offline-first — all dependencies are bundled or downloadable as offline packages. No runtime network fetches unless explicitly triggered.
Single-binary CLI — k2s.exe is the only user-facing tool; all operations route through it.
K2s ships several supporting executables beyond the main k2s.exe CLI. All are built from Go source under k2s/cmd/ and placed in the bin/ directory.
Networking Tools
Tool
Source
Purpose
httpproxy.exe
k2s/cmd/httpproxy/
HTTP forward proxy running on the Windows host. Transparently proxies internet traffic for the Linux VM when a corporate proxy is configured.
vfprules.exe
k2s/cmd/vfprules/
Manages Virtual Filtering Platform (VFP) rules on the cbr0 Hyper-V external switch. Routes pod and service traffic between the host and the Linux VM.
bridge.exe
k2s/cmd/bridge/
Windows CNI bridge plugin (based on Microsoft's windows-container-networking). Creates the cbr0 bridge for pod networking on the Windows worker.
l4proxy.exe
k2s/cmd/l4proxy/
Layer 4 (TCP/UDP) proxy used in CNI networking for forwarding traffic between network namespaces.
VM & Provisioning Tools
Tool
Source
Purpose
cloudinitisobuilder.exe
k2s/cmd/cloudinitisobuilder/
Builds cloud-init ISO images (ISO 9660) for provisioning the Linux VM with network config, SSH keys, and initial setup scripts.
devgon.exe
k2s/cmd/devgon/
Go reimplementation of Microsoft's devcon.exe (Device Console). Manages network adapters without requiring the VC Runtime (vcruntime140.dll).
Service Mesh & Security Tools
Tool
Source
Purpose
cplauncher.exe
k2s/cmd/cplauncher/
Compartment Launcher — starts Windows processes inside a specific network compartment, enabling Linkerd service mesh on Windows. Resolves compartments from Kubernetes pod labels and optionally injects a DLL for per-thread compartment switching.
login.exe
k2s/cmd/login/
OAuth2/OIDC login provider using Ory Hydra. Provides Windows-logon-based authentication for the security addon's zero-trust mode.
Container Tools
Tool
Source
Purpose
pause.exe
k2s/cmd/pause/
Windows pause container. Every Windows pod includes this as the infrastructure container (holds the network namespace). Ships with its own Dockerfile.
Utilities
Tool
Source
Purpose
yaml2json.exe
k2s/cmd/yaml2json/
Converts YAML to JSON. Used internally by scripts that need JSON input from YAML sources.
zap.exe
k2s/cmd/zap/
Forcefully removes directories that Windows file locks prevent from being deleted (used by k2s image reset-win-storage --force-zap).
Building Tools from Source
All Go tools can be built locally using the build script: