How can i deploy kubernetes for trial purpose? (sandbox kind of environment) How can i deploy kubernetes for trial purpose? (sandbox kind of environment) kubernetes kubernetes

How can i deploy kubernetes for trial purpose? (sandbox kind of environment)


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:

How to install Kubernetes

You need to install 3 components

Install Virtual Box

$ 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

Install Kubectl

$ 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

Install Minikube

$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.20.0/minikube-linux-amd64$ chmod +x minikube$ sudo mv minikube /usr/local/bin/

Minikube Commands

start k8 cluster $ minikube startor 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=trueenable any addon e.g. heapster $ minikube addons enable heapstersee all k8 versions $ minikube get-k8s-versionssee minikube status $ minikube statusaccess k8 dashboard $ minikube dashboard (this will open your browser)stop minikube $ minikube stop

Reference


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/)