This comprehensive Linux guide expects that you run the following commands as root user but if you decide to run the commands as a different user then ensure that the user has
sudoaccess and that you precede each of the privileged commands withsudo
Minikube is used to run Kubernates locally. It runs Kubernates in a virtual machine on your machine. Setting up a Kubernetes cluster from scratch can be quite the hurdle and would definitely stop many people from learning Kubernetes before ever getting to know the tool itself. This is the problem that Minikube solves.
Installing Dependencies
To install minikube, we first need to ensure that a hypervisor is already installed on the system such as KVM or VirtualBox. Secondly kubectl must be installed.
Installing Kubectl
Step One: Run the following command in terminal to download the latest release using curl
root@codesposts:~# curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
%Total %Received %Xferd Average Speed Time Time Time Current
Dload Upload TotalSpentLeft Speed
100 40.9M 100 40.9M 0 0 129M 0 --:--:-- --:--:-- 129M
Step Two: Make the kubectl binary executable.
chmod +x ./kubectlStep Three: Add the binary to the PATH
mv ./kubectl /usr/local/bin/kubectlStep Four : Test to ensure the version you installed is up-to-date:
root@codesposts:~# kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:40:16Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}Installing Hypervisor
If you do not already have a hypervisor installed, install one of these now: KVM or VirtualBox.
Installing VirtualBox
apt-get install virtualbox virtualbox-ext-packInstalling KVM
apt-get install qemu-kvm libvirt-bin virtinst bridge-utils cpu-checkerInstalling Minikube
There are two ways to install Minikube.
Install Using Package
You can find Latest and experimental releases of Linux packages from Minikube’s releases page on GitHub.
Use your Linux’s distribution’s package tool to install a suitable package
Install Using Direct Download
Open terminal and type the following command to download Minikube using curl
root@codesposts:~# curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
% Total %Received %Xferd Average Speed Time Time Time Current Speed
100 39.8M 100 39.8M 0 0 75.2M 0 --:--:-- --:--- 75.0MMake the binary executable
chmod +x minikubeAdd Minikube to PATH
install minikube /usr/local/binIf Minuke has been succesfully installed, run the following command:
minikube startYou need to clear minikube’s local state if you get the error : machine does not exist
minikube deleteInstalling Kubernates
Step One: Install Minikube and create a cluster
minikube startCheck the cluster info using
kubectl cluster-infoYou can also check the Kubectl default configuration with the following command:
kubectl config viewTo check the running nodes, run the following command:
kubectl get nodesYou can also access the Minikube Virtualbox with the following command:
minikube sshYou can check the status of Minikube with the following command:
minikube statusAccessing Kubernates Dashboard
Run the following command to get to the minikube dashboard.
minikube dashboard --urlThe Minikube web url is now generated. Next, open any web browser and type the URL http://127.0.0.1:56508/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/.
You will be redirected to the Kubernate dashboad
The post How To Install Kubernetes With Minikube On Ubuntu 18.04 LTS appeared first on CODESPOSTS.COM.
Go to Source
Author: staff
Discover more from Ubuntu-Server.com
Subscribe to get the latest posts sent to your email.


