As you are learning Kubernetes, it's recommended that you setup a cluster locally on your own machine so you can follow along and try things out when you get a desire to experiment. There are two good options: Rancher Desktop, and Minikube. Rancher Desktop is recommended, but Minikube is also a fine choice.

Rancher Desktop

Rancher Desktop can create a single-node Kubernetes cluster on your local machine. If you don't have it installed already, you can do it from the instructions on this page.

When Rancher Desktop is running, open up its Preferences, in which there should be a "Kubernetes" button on the sidebar. Click on this, and then check the box next to "Enable Kubernetes" if it's unchecked, and Rancher Desktop will start its Kubernetes cluster.

Minikube

Another option for getting a single-node cluster on your local machine is Minikube. You can find an installation guide for each operating system here.

Testing your Docker Desktop or Minikube cluster

To test your cluster, first install kubectl. If you have already installed Rancher Desktop, this comes packaged with it. If not, follow the instructions on this page to install kubectl.

When you have kubectl, test your cluster by running kubectl get pods. You'll receive a message like No resources found in default namespace. since you haven't defined any Pods yet. But this will show that your cluster is up and running.

Note: Both Rancher Desktop and Minikube do some magic behind the scenes to make sure that when you use kubectl, you're automatically pointing to their cluster. When you start using kubectl against remote clusters, you'll have to use a Kubeconfig to indicate the target. Kubeconfigs are covered later in this document.