Setup Minikube
We will use minikube in to run kubernetes cluster in your local machine. You can download and install minikube from their official website: https://minikube.sigs.k8s.io/docs/.
Start and Configure a Kubernetes Cluster
Start Minkube
minikube start --kubernetes-version=v1.31.0 --cpus=2 --memory=4096This starts a cluster with 2 CPUs and 4GB of memory, running Kubernetes version 1.31.0.
You can check the cluster status:
kubectl cluster-infoWhich should return below information:
Kubernetes control plane is running at https://127.0.0.1:57821
CoreDNS is running at https://127.0.0.1:57821/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.View Cluster Configuration
Check Node information.
kubectl get nodes
kubectl describe node minikubeList system components of kubernetes such as API Server, Scheduler, Controller Manager, CoreDNS, etc.
Above command should return you list like below.
Add/Remove Nodes
Although Minikube is single-node by default, simulate multi-node behavior using Minikube profiles. Here's how to add a new Node in minikube.
Get list of nodes again using kubectl get nodes and it should return newly added nodes.
Removing a Node.
References
Last updated