Diagnostics
K2s System Status
To inspect the full K2s system status, run:
Disruption in networking
When there is no internet access on the host machine or when container images cannot be pulled, it is recommended to restart the cluster networking in the following scenarios:
- The host machine is switched between networks (e.g. remote or office).
- The host machine experiences an unintended crash.
- After booting the host machine from hibernation, or following a reboot or shutdown.
- The VPN on the host machine is turned on or off (e.g., Zscaler).
Log Files
To analyze the log files, browse the directory <install-drive>\var\log. The main log file is k2s.log.
Dumping K2s Debug Information
To dump K2s system information, run:
The dump collects logs, configuration, and cluster state into a zip file at C:\var\log\k2s-dump-<hostname>-<datetime>.zip.
Network Diagnostics Dump
A dedicated network diagnostics dump is also available. It collects network-specific information (adapter states, routes, HNS networks, firewall rules) separately from the general system dump. The network dump script is located at lib\scripts\k2s\system\dump\network_dump.ps1.
Packet Capture
For deep network troubleshooting, capture packet traces on the Windows host:
- Navigate to the debug directory:
- Start capturing:
- Reproduce the issue.
- Stop capturing:
- Analyse the trace file at
C:\server.etlusing Microsoft Network Monitor or Wireshark (with an ETL conversion tool).
Debug Helper Scripts
Several PowerShell debug scripts are available in smallsetup\helpers\ for diagnosing specific subsystems:
| Script | Purpose |
|---|---|
DebugFlannel.ps1 |
Inspect flannel CNI state, subnet leases, and routing tables |
DebugKubelet.ps1 |
Inspect kubelet logs and configuration on the Windows host |
DebugProxy.ps1 |
Inspect kube-proxy state and service routing rules |
DebugLoopbackConnectionProfile.ps1 |
Debug the loopback adapter connection profile (in smallsetup\debug\) |
Usage
Run from an elevated PowerShell prompt:
cd <installation-folder>\smallsetup\helpers
.\DebugFlannel.ps1
.\DebugKubelet.ps1
.\DebugProxy.ps1
Network Repair Scripts
When networking issues persist after a restart, these helper scripts can restore connectivity:
| Script | Purpose |
|---|---|
RecreateRoutes.ps1 |
Recreate pod/service network routes on the Windows host |
ResetNetwork.ps1 |
Full network reset (adapters, routes, HNS networks) |
ResetSystem.ps1 |
Full system reset (network + cluster state) |
RefreshEnv.ps1 |
Refresh environment variables without restarting the shell |
Warning
ResetSystem.ps1 is destructive — it resets the entire K2s system state. Use it only as a last resort.
Alternatively, use the CLI for a network reset (requires a reboot):
Listing ALL PVCs
Get the list of all mounted volumes, their size and their namespace:
Get the list of all mounted volume claims and their current usage: