In this blog, we will install Kubernetes with Minikube on Windows. Minikube is a free tool that helps in setting up single-node Kubernetes clusters on various platforms.
Minikube is a tool that makes it
easy to run Kubernetes locally. Minikube runs a single node Kubernetes cluster
inside a VM. It is one of the best way to try out Kubernetes locally.
Pré-Requisites for your Minikube:
- 2 CPUs or more
- 2GB of free memory
- 20GB of free disk space
- Internet connection
- Container or virtual machine manager, such as: Docker, QEMU, Hyperkit, Hyper-V, KVM, Parallels, Podman, VirtualBox, or VMware Fusion/Workstation
https://minikube.sigs.k8s.io/docs/start/
1. Installation: Click on the buttons that describe your target platform, To install the latest minikube stable release on x86-64 Windows using .exe download: *Operating system *Architecture *Release type *Installer type
Download and run the installer for the latest release.
Click on Next
Click on I
Agree
Click on Install
2. Start your cluster
From a terminal with administrator access (but not logged in as root),
run: It may take time as per your internet speed.
$minikube start3. Interact with your cluster
If you already have kubectl installed, you can now use it to access your
shiny new cluster:
kubectl get po –A
Alternatively, minikube can download the appropriate version of kubectl
and you should be able to use it like this:
minikube kubectl -- get po –A
You can also make your life easier by adding the following to your shell
config:
alias kubectl="minikube kubectl --"Initially, some services such as the storage-provisioner, may not yet be
in a Running state. This is a normal condition during cluster bring-up, and
will resolve itself momentarily. For additional insight into your cluster
state, minikube bundles the Kubernetes Dashboard, allowing you to get easily
acclimated to your new environment:
minikube dashboard
kubectl get services hello-minikubeThe easiest way to access this service is to let minikube launch a web browser for you:
minikube service hello-minikubeAlternatively, use kubectl to forward the port:
kubectl port-forward service/hello-minikube 7080:8080
Tada! Your application is now available at http://localhost:7080/You should be able to see the request metadata in the applicationoutput. Try changing the path of the request and observe the changes.Similarly, you can do a POST request and observe the body show up in theoutput.5. Manage your cluster
Pause Kubernetes without impacting deployed applications:
minikube pause
Unpause a paused instance:
minikube unpause
Halt the cluster:
minikube stop
Change the default memory limit (requires a restart):
minikube config set memory 9001
Browse the catalog of easily installed Kubernetes services:
minikube addons list
Create a second cluster running an older Kubernetes release:
minikube start -p aged --kubernetes-version=v1.16.1
Delete all of the minikube clusters:
minikube delete --all

No comments:
Post a Comment