Minikube : A Local Kubernetes— Lets Sail Together

Chaskarshailesh
Javarevisited
Published in
3 min readMar 19, 2023

Minikube : a Local Kubernetes, focusing on making it easy to learn and develop for Kubernetes — You need Docker Container Runtime + Kubectl installed.

Once setup is done lets start playing with k8s objects.

Reference for various yaml files : GitHub project link :- https://github.com/Shaileshchaskar81/explore-docker

Step 1: Start 2 nodes Cluster

minikube start --nodes 2 -p multinode-demo
kubectl cluster-info
kubectl get nodes
kubectl get pods -A

Referring Visual Code you can list below:

K8s Extension : 2 Nodes

Docker Extension : 2 Containers + multinode demo bridge + 2 volumes one each for a container

Step 2: Lets create a pod

kubectl apply -f myapp-pod.yaml
kubectl get pods

Lets describe the pod and look at the details such as Containers and, Volumes and events from Visual Code.

Step 3: Lets create a deployment

kubectl apply -f myapp-deployment.yaml
kubectl get deployments
kubectl get pods

Step 4: Lets create a replicaSet

kubectl apply -f myapp-replicaset.yaml
kubectl get replicasets
kubectl get pods

Step 5: Lets test replicaSets and deployments via pod deletion

kubectl get pods
kubectl delete pod <pod name>

Last but not least — one Pod is running on both the nodes

kubectl get pod -o wide

Step 6: Lets stop and remove all the related k8s objects

Cluster info when we started it — as shown below:-

minikube status
minikube profile list

Step 7: Lets stop the Cluster

minikube stop -p multinode-demo
minikube status -p multinode-demo

Step 8: Lets Delete all the created k8s objects

minikube profile list
minikube delete --all

That’s about Minikube : A Local Kubernetes……Lets keep learning together .. Lets sail together.

--

--

Chaskarshailesh
Javarevisited

I am a Site Reliability Engineer aspirant Cloud Solutions Architect. Further exploring the horizon into MLOps