In this practical exercise, a learning environment was created using and old macOS workstation to install an all-in-one local Kubernetes cluster with worker nodes -isolated by a Docker container-, and using minikube to manage the clusters.
Requirements for this test environment:
- At least 2 CPU cores (or virtual CPUs), 2 GB of RAM memory (4GB recommended), and 20 GB of disk storage.
- Docker Desktop (v4.15.0)
- Minikube (v1.37.0)
Glossary:
1. Creating a local cluster with 1 node (Control Plane)
- 1.1 Installing Docker Desktop for mac
- 1.2 Installing Minikube
- 1.3 Run Minikube
- 1.4 Checking the status
- 1.5 Checking the cluster
- 1.6 Stopping the cluster
2. Creating a new cluster with 2 nodes
Steps:
1.1 Installing Docker Desktop for mac
The minikube start command generates a default minikube cluster with the standard specifications and it will store these specs so that we can restart the default cluster whenever desired. The object that stores the specifications of our cluster is called
profile, in this case named minikube.
Once the node is provisioned, it bootstraps the Kubernetes control plane (with the default kubeadm tool), and it installs the latest version of the default container runtime docker. That will serve as a running environment for the containerized applications
we will deploy to the Kubernetes cluster.
The minikube profile list command allows us to view the status of all our clusters in a table formatted output.
The table displays the number of nodes: 1 by default, the private IP address of the minikube cluster's control plane 'Docker' and other outputs.
In this exercise a cluster with 2 nodes were created (Control Plane + Worker node) using the Docker runtime, and the Kubernetes containerd runtime.
The minikube start command allows us to create custom profiles with the --profile or -p flags.
Driver: docker
Nodes: 2
Runtime: containerd
CNI: calico
Profile name: 'genbox'
2.3 Decommissioning the cluster
If a cluster is no longer needed, the container can be easily removed.
By default a dashboard is included in the minikube tool (add-on).
3.2 Using Docker Desktop
