I have WSL2/Docker Desktop for Windows 11.
I have enabled Kubernetes in the Settings.
However when I try to do this example on Encrypting Data At Rest in Kubernetes, I do not see /etc/kubernetes
Docker Desktop is mainly for developing containerized applications. You can run Kubernetes, but it is not designed to reconfigure the server by changing configuration files. Everything is inside the virtual machine of Docker Desktop, but in Docker Desktop, the Docker daemon is running in a containerd container so there are multiple layers of containers here. It means the root folder of the container is not the same as the root folder of the WSL distribution:
If you want to see the files you can run the following command:
docker run --rm -it --privileged --pid host ubuntu:20.04 \
nsenter --all -t 1 \
-- ls -l /etc/kubernetes/
It will run nsenter in an ubuntu container, then nsenter will run “ls” in the virtual machine.
Update: I realized that I have just run the command in the virtual machine so it is in the system root, but I ran it on macOS. Docker Dekstop for Windows should work the same way. I guess you ran the command in an other WSL distribution.
If you want to change configuration files, I would use Multipass instead
Everything is inside the virtual machine of Docker Desktop, but in Docker Desktop, the Docker daemon is running in a containerd container so there are multiple layers of containers here. It means the root folder of the container is not the same as the root folder of the WSL distribution:
Kubernetes is not simple and Docker Desktop is not simple either. It is a very complex tool with its limits so you can practice the basics. Encryption at rest is not basic
There was a CNCF webinar on youtube two weeks ago. The speaker talked about encryption at rest and he used minikube too. Multipass can start a minikube VM, but you can install it directly on Windows if you want to
@rimelek “It means the root folder of the container is not the same as the root folder of the WSL distribution:”
But I am able to run the kubectl commands in the wsl terminal.
Also I had problems running minikube and there is no support for it - no one replies in the minikube forums, so I was happy that I could just enable k8s in DD and run it.