Reputation: 1243
Links suggested i use minikube to install kubernetes. However i am confused if i should install this on my ubuntu host machine or on the vm provisioned with virtual box running on this host machine. I want to know the pre-requisites for the install and how to go about it. I am a newbie to kubernetes and pretty confused on how to go about it.
Upvotes: 2
Views: 224
Reputation: 5152
You can try Kubernetes right away with Minikube. It will take just a few minutes to see Kubernetes running on your laptop or desktop. I tried it on my laptop with Ubuntu 16.04. I put it here https://gitlab.com/abushoeb/kubernetes/ but for your convenience, you can just follow the following steps:
$ sudo nano /etc/apt/sources.list (add followin line to your sources.list if you haven't already)
deb http://download.virtualbox.org/virtualbox/debian xenial contrib
$ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
$ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install virtualbox-5.1
$ curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
$ chmod +x ./kubectl
$ sudo mv ./kubectl /usr/local/bin/kubectl
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.20.0/minikube-linux-amd64
$ chmod +x minikube
$ sudo mv minikube /usr/local/bin/
start k8 cluster $ minikube start
or start specific version of k8 $ minikube start --kubernetes-version="v1.5.2"
or start with a flag enabled $ minikube start --kubernetes-version="v1.5.3" --extra-config kubelet.EnableCustomMetrics=true
enable any addon e.g. heapster $ minikube addons enable heapster
see all k8 versions $ minikube get-k8s-versions
see minikube status $ minikube status
access k8 dashboard $ minikube dashboard (this will open your browser)
stop minikube $ minikube stop
Upvotes: 3
Reputation: 8825
Minikube already provides a VM with K8s installed. In this sense, with Minikube, you do not need to install anything. If your aim is to test how to work with Kubernetes (i.e. deploying pods, services, volumes...), then Minikube is for you. If, on the contrary, you want to experiment how to actually install Kubernetes (i.e. install kubelet, the API server...) then you will need to find another alternative, like for example sinning up several Ubuntu VMs and follow the installation documentation (https://kubernetes.io/docs/setup/pick-right-solution/)
Upvotes: 1