Tuesday 29 August 2017

Steps Installing Minikube on Linux

Step 1: Install the hypervisor (VirtualBox)

sai-HP ~ # apt-get install virtualbox
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following extra packages will be installed:
  libgsoap4 libvncserver0 virtualbox-dkms
Suggested packages:
  libvncserver0-dbg vde2 virtualbox-guest-additions-iso
Recommended packages:
  virtualbox-qt
The following NEW packages will be installed:
  libgsoap4 libvncserver0 virtualbox virtualbox-dkms
0 upgraded, 4 newly installed, 0 to remove and 609 not upgraded.
Need to get 14.7 MB of archives.
After this operation, 63.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
......
......
......

step2 : 
sai-HP ~ # apt-get update
Ign http://dl.google.com stable InRelease
Hit http://dl.google.com stable Release.gpg                                   
Hit http://dl.google.com stable Release   
....
....
....

step3 : Install minikube

sai-HP ~ # curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.20.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 78.7M  100 78.7M    0     0  5308k      0  0:00:15  0:00:15 --:--:-- 6105k
                                          
step4 : Start minikube
 
sai-HP ~ # minikube start
There is a newer version of minikube available (v0.21.0).  Download it here:
https://github.com/kubernetes/minikube/releases/tag/v0.21.0

To disable this notification, run the following:
minikube config set WantUpdateNotification false
========================================
kubectl could not be found on your path. kubectl is a requirement for using minikube
To install kubectl, please run the following:

curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.6.4/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/

To disable this message, run the following:

minikube config set WantKubectlDownloadMsg false
========================================
Starting local Kubernetes v1.6.4 cluster...
Starting VM...
Downloading Minikube ISO
 90.95 MB / 90.95 MB [==============================================] 100.00% 0s
Moving files into cluster...
Setting up certs...
Starting cluster components...
Connecting to cluster...
Setting up kubeconfig...
Kubectl is now configured to use the cluster.

sai-HP ~ # 

step5 : Check the status
sai-HP ~ # minikube status
========================================
kubectl could not be found on your path. kubectl is a requirement for using minikube
To install kubectl, please run the following:

curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.6.4/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/

To disable this message, run the following:

minikube config set WantKubectlDownloadMsg false
========================================
minikube: Running
localkube: Running
kubectl: Correctly Configured: pointing to minikube-vm at 192.168.99.100

step 6: Stop minikube
sai-HP ~ # minikube stop
========================================
kubectl could not be found on your path. kubectl is a requirement for using minikube
To install kubectl, please run the following:
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.6.4/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
To disable this message, run the following:
minikube config set WantKubectlDownloadMsg false
========================================
Stopping local Kubernetes cluster...
Machine stopped.

sai-HP ~ # minikube status
========================================
kubectl could not be found on your path. kubectl is a requirement for using minikube
To install kubectl, please run the following:
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.6.4/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
To disable this message, run the following:
minikube config set WantKubectlDownloadMsg false
========================================
minikube: Stopped
localkube:
kubectl:
sai-HP ~ #


 

Installing kubectl on Linux


sai-HP ~ #  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   Total   Spent    Left  Speed
100 68.9M  100 68.9M    0     0  5528k      0  0:00:12  0:00:12 --:--:-- 6228k

sai-HP ~ # chmod +x ./kubectl

sai-HP ~ # sudo mv ./kubectl /usr/local/bin/kubectl

sai-HP ~ # kubectl config view
apiVersion: v1
clusters:
- cluster:
    certificate-authority: /root/.minikube/ca.crt
    server: https://192.168.99.100:8443
  name: minikube
contexts:
- context:
    cluster: minikube
    user: minikube
  name: minikube
current-context: minikube
kind: Config
preferences: {}
users:
- name: minikube
  user:
    client-certificate: /root/.minikube/apiserver.crt
    client-key: /root/.minikube/apiserver.key
sai-HP ~ #

 

sai-HP ~ # kubectl cluster-info
Kubernetes master is running at https://192.168.99.100:8443

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.