Creating a Kubernetes cluster using Minikube
Now, we are ready to create a Kubernetes cluster! We will use Minikube to create a local single-node cluster. Minikube can be deployed in a VM, a container, or on bare metal using different drivers. We will use one of the preferred drivers, the Docker driver, where the Minikube instance runs in a container managed by Docker Desktop on macOS and Windows with Windows Subsystem for Linux, v2 (WSL 2).
For information on the available drivers in Minikube, see https://minikube.sigs.k8s.io/docs/drivers/.
Docker and its containers are already running in a separate WSL 2 instance; see the Installing Docker Desktop for Windows section in Chapter 22, Installation Instructions for Microsoft Windows with WSL 2 and Ubuntu.
One drawback of running Minikube as a container on Docker is that ports exposed by Minikube are only accessible on the host that runs Docker. To make the ports available to Docker clients, for example, macOS...