How To Install And Deploy hello-minikube Application On Minikube

How to Install and Deploy hello-minikube Application on Minikube

Minikube requirement

Following are the requirement for Minikube to work properly.

  • 2GB of free memory
  • 2 CPUs or more
  • 20GB of free disk space
  • A good Internet connection
  • Container or virtual machine manager: Docker, Hyper-V, KVM, Parallels, VirtualBox, or VMWare. install any of the Software for installing Minikube

Note
I recommend introducing Virtualbox as the backend minikube driver. It works with next to no issues

Installation MiniKube

Minikube installation is extremely straightforward. You simply have to download the bundle. A solitary parallel is executable and that is all you want.

To begin with, go to https://minikube.sigs.k8s.io/docs/start/ and select the proper operating system and other operating system explicit boundaries. You will get the installation commands for the specific OS as shown below.

For example, if you have selected Linux Binary to download the installation of Minikube is as simple as 

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube

Verify installation by command checking the minikube version.

minikube version

Start Minikube With Virtualbox

I personally favor Virtualbox because I use it for other testing purposes. "If you use the docker drivers, Nodeport will not work properly." You can install Virtualbox and start minikube with Virtualbox driver. There won't be any issue with NodePort services if you utilize the Virtualbox driver.

minikube start --driver=virtualbox

Here we are explicitly referencing --driver=virtualbox because, by default, it picks Docker driver assuming docker is installed on your system. On the off chance that you don't have Docker and just Virtualbox, minikube picks the Virtualbox driver by default.

if you are running interestingly, Minikube will download the base VM image to deploy Kubernetes on Virtualbox. It will require two or three minutes for minikube to start. On successful execution, you will see the messages.

How to Install and Deploy hello-minikube Application on Minikube

To verify, the following status command.

minikube status

You see the following output.

minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

Deploy applications

Create a sample deployment and expose it on port 8080,

kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.4
kubectl expose deployment hello-minikube --type=NodePort --port=8080

It will take, a couple of mins but your deployment will soon show up when you run:

kubectl get services hello-minikube

The simplest method for getting this help is to let minikube send off an internet browser for you:

minikube service hello-minikube

On the other way, use kubectl to advance the port:

kubectl port-forward service/hello-minikube 8081:8080

Yeah! Your application is now accessible at http://localhost:8081/.

References 


Similar Articles
Ezmata Technologies Pvt Ltd
You manage your core business, while we manage your Infrastructure through ITaaS.