During this course, we'll be using Minikube to practice with Kubernetes. In production, you probably wouldn't use Minikube, you would use a cluster of servers, probably in the cloud. That's expensive! Minikube is a fantastic tool that allows you to run a single-node Kubernetes cluster on your local machine.
Follow the official installation instructions for Minikube. Notice at the top the "what you'll need" section. If you don't have the system requirements, you'll have a hard time getting everything up and running, unfortunately.
Run minikube version to verify that Minikube is installed correctly.
We'll be using Kubernetes with Docker, which is arguably the most common way to use Kubernetes. Make sure your Docker daemon is running before starting Minikube. If you haven't yet taken our Docker course, you should do that first.
Next, run:
minikube start --extra-config "apiserver.cors-allowed-origins=["http://boot.dev"]"
This will take a few minutes to complete the first time. The extra configuration is just so we can hit your cluster from Boot.dev. You should see a message like "kubectl is now configured to use "minikube" cluster and "default" namespace by default".
Next, run the following command:
minikube dashboard --port=63840
This will open a browser window with a locally hosted dashboard for your cluster. You can use this dashboard to view and manage your cluster. We won't be using it much in this course, but it's a great tool to know about. We set the port to 63840 because that's the port the Boot.dev CLI tool will check.
Run and submit the CLI tests.
Keep minikube running throughout the rest of the course.
You can have problems if virtualization is not enabled.
Docker desktop Settings -> Resources -> WSL integration (Check the box to enable integration with default WSL distro)
If you've installed minikube in the past, you might have conflicts. If you don't care about your old minikube clusters, you can delete them by running:
minikube stop
minikube delete
Then restart minikube.