Switch from Docker Desktop to Rancher Desktop in 5 Minutes
š£ Update (February 2022)
Weāve revamped this blog post to reflect recent changes to both Tilt and Rancher Desktop.
The good news? Itās easier than ever to use Tilt and Rancher Desktop together!
(There is no bad news.)
Rancher Desktop is a new way to run Kubernetes on macOS and Windows.
As a user, there are many similarities with Docker Desktop: Rancher Desktop manages a transparent VM with a container runtime and a single-node development Kubernetes cluster.
However, behind the scenes, thereās a couple notable differences:
- By default, Rancher Desktop uses containerd instead of Docker
- Rancher Desktop uses k3s as the Kubernetes cluster (k3s is a a lightweight, certified Kubernetes distribution also maintained by Rancher)
As a Docker Desktop moving to Rancher Desktop, the quickest way (I did promise you could do this in 5 minutes after all!) is to configure Rancher Desktop to use Docker as the container runtime.
Pssstā¦interested in using Rancher Desktop + containerd with Tilt? š Take a look at another of our blog posts in the Rancher Desktop series: Rancher Desktop: Should You Use containerd Or dockerd?.
ā ļø Watch Out!
You cannot run both Docker Desktop and Rancher Desktop (in dockerd
mode) simultaneously!
See rancher-desktop#1081 for details.
Go ahead and open the Rancher Desktop preferences and choose dockerd (moby)
as the Container Runtime in the āKubernetes Settingsā section:
Once selected, Rancher Desktop will prompt you to confirm before resetting the cluster.
After itās started back upā¦youāre done!
Tilt (as of v0.25.1+) will automatically detect your Rancher Desktop with dockerd
configuration and use it for any docker_build
calls.
Similar to using Docker Desktop with its built-in Kubernetes support, no local registry or image pushes are required.
This is possible because Tilt is building directly to the container runtime (dockerd
) used by the cluster node, so building the image also makes it available for use by Pods.
If this sounds a bit complex - we agree!
Hopefully, you never have to think about it because Tilt takes care of finding the optimal strategy based on your configuration automatically.
ā¹ļø If you use
docker
via the CLI, you might notice a bunch of running containers, including Kubernetes cluster components as well as any Pods you have deployed. You should avoid manipulating these directly via Docker to avoid conflicting with Rancher Desktop.
Rancher Desktop is still very new and evolving fast! Weāre always excited to see new tools in the local Kubernetes space - if youāre using Rancher Desktop with Tilt, let us know ā¤ļø