Setting up Kubernetes in WSL
There is no shortage of options for installing Kubernetes, including the following:
- Kind (https://kind.sigs.k8s.io/)
- Minikube (https://kubernetes.io/docs/tasks/tools/install-minikube/)
- MicroK8s (https://microk8s.io/)
- k3s (https://k3s.io/)
The first of these, Kind, stands for Kubernetes in Docker and was designed for testing Kubernetes. As long as your build tool can run Docker containers, it can be a good option as a way to run Kubernetes as part of your integration tests in your automated builds. By default, Kind will create a single-node Kubernetes cluster but you can configure it to run multi-node clusters, where each node is run as a separate container (we will see how to use Kind in Chapter 10, Visual Studio Code and Containers in the Working with Kubernetes in dev container section).
For this chapter, however, we will use the built-in Kubernetes capabilities in Docker Desktop, which provides a convenient way to enable...