Earlier this year I’ve started using K3s regularly for local testing of Kubernetes workloads, APIs, tools, and more. I’ve grown quite fond of k3s for multiple reasons: it’s very easy and fast to install, very easy to use, and so far I have not found a single service designed for K8s that wouldn’t work on K3s. I’ve run it both on Linux machines as well as on Windows machines through WSL2.
Over the last few days I noticed that when I use kubectl to manage a k8s test cluster in Azure, it takes forever to actually carry out the operations remotely. Today I took some time to debug this. Here’s how I debugged and ultimately fixed the slow kubectl commands on Windows.
Get Verbose Output # I started with changing the log level, and capturing the details, like this:
kubectl get pods -v=20 Given that the commands worked so slowly, I had enough time to just read what was going on while it was going on, and even see right awayt where the problem was.