Skip to main content

WSL obsolete instructions

Connect to Windows Docker (WSL1)

  • In Docker settings, make sure to expose the daemon (in Settings > General > Expose daemon on tcp://localhost:2375 without TLS)
  • In Linux, make sure the DOCKER_HOST environment variable is set (echo $DOCKER_HOST => localhost:2375)

WSL 2

If your OS version is compatible, you should update to WSL 2.

Known issues

# temporary fix, to be run regularly
sudo hwclock -s
wsl --shutdown
  • Zombie process
ps axo stat,ppid,pid,comm | grep -w defunct
sudo kill -9 <pid>

Recipes

Kubernetes

Connect to Windows Minikube

  • In Windows, look at the kube config
kubectl config view
  • In Ubuntu, configure the kube context
kubectl config set-cluster minikube --server=https://127.0.0.1:<port> --certificate-authority=/mnt/c/Users/<username>/.minikube/ca.crt
kubectl config set-credentials minikube --client-certificate=/mnt/c/Users/<username>/.minikube/profiles/minikube/client.crt --client-key=/mnt/c/Users/<username>/.minikube/profiles/minikube/client.key
kubectl config set-context minikube --cluster=minikube --user=minikube
kubectl config use-context minikube
kubectl get nodes
kubectl version

Theming

Learn

Readings

Systemd

Configuration

  • \\wsl.localhost\<linux_distribution>\etc\wsl.conf to configure WSL
[automount]
options = "metadata"

[interop]
appendWindowsPath = false
  • For old kernels, one can enable compatibility with iptables:
sudo update-alternatives --config iptables