Usage of docker in wsl for kubernetes

Hi! I use docker desktop on my windows 10 laptop. It is running on wsl backend. I want to use this laptop as one of me home kubernetes workers. Also, I want to rule it by ansible from my another ubuntu device.

So, can I install kubernetes to default docker wsl docker-desktop distro? And can it be connected to my cluster?

Or should I install separate wsl distro, like ubuntu and install docker or containerd with another kubernetes dependencies in it by apt-get install?

The built-in Kubernetes support in Docker Desktop creates a single node master cluster. I doubt it is designed to be joined as a worker node of another cluster. You could control the single node master using the kube api in Ansible, but you won’t be able to control the os level.

Why don’t you just install a worker node of a k8s distro of your choosing in a wsl distribution?
Furthermore, you will need to solve how the wsl2 distro port can be accessed from the lan:

I have seen this manual — https://kind.sigs.k8s.io/docs/user/using-wsl2. They mention Docker Desktop, but anyway they offer a lot of different additional steps about kernel addons

How is it? Why?

A bit not understand your question. Can you reformulate, please?

Yeah, I think, I will do port forwarding. Or even something like bridge as in this manual

if the kind documentation indicates that your scenario is supported, then why not. The Kind components would be just deployed payload from Docker Desktop perspective.

Because it’s design as a closed appliance. Everything runtime related is on the read-only filesystem of the docker-desktop distribution. Everything data related in the docker-desktop-data distribution.

Why don’t you manually install a k8s worker in a wsl2 distribution.

So, what wsl2 distro name do you recommend me to use for the saving of installed preferences of Docker Desktop? I haven’t found this info from kind manual.

I still not understand what you offer, honesty. I am installing a k8s worker in a wsl2 distribution now by kind manual, amn’t I?

I am not sure how to respond to your post, I will leave it for someone else to answer.