Skip to content

genquiky/K8S-local-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 

Repository files navigation

image

Part I: Cluster and Nodes creation

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)

2. Creating a new cluster with 2 nodes

3. GUI monitoring dashboards


1. Creating a local cluster with 1 node (Control Plane)

Steps:

1.1 Installing Docker Desktop for mac

image



1.2 Installing Minikube

image



1.3 Run Minikube

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.


image



1.4 Checking the status

image



1.5 Checking the 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.

image



1.6 Stopping the cluster

image




2. Creating a new cluster with 2 nodes

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.

2.1 Adding a new cluster

Driver: docker
Nodes: 2
Runtime: containerd
CNI: calico
Profile name: 'genbox'


image


2.2 Checking the new cluster

image


image


2.3 Decommissioning the cluster

If a cluster is no longer needed, the container can be easily removed.


image


3. GUI monitoring dashboards

3.1 Minikube Dashboard

By default a dashboard is included in the minikube tool (add-on).

image

image



3.2 Using Docker Desktop

image

About

Kubernetes Part I: Creation of all-in-one local cluster on MacOS

Topics

Resources

Stars

Watchers

Forks

Contributors