Forked from gonzaloplaza/minikube_ubuntu_installation.md
Created
April 11, 2019 17:26
-
-
Save karlmutch/f6bfc81a08b3815888d632dc572764bc to your computer and use it in GitHub Desktop.
Revisions
-
Gonzalo Plaza revised this gist
Jul 19, 2018 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -71,7 +71,8 @@ $ echo "alias k='kubectl'" >> ~/.bash_aliases $ echo "alias mk='minikube'" >> ~/.bash_aliases ``` ### Documentation Reference Some documentation and tutorials - https://kubernetes.io/docs/tasks/tools/install-minikube/ - https://kubernetes.io/docs/tasks/tools/install-kubectl/ - https://linuxhint.com/install-minikube-ubuntu/ -
Gonzalo Plaza revised this gist
Jul 19, 2018 . 1 changed file with 13 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Overview: 4. Start and Test Minikube local cluster and expose demo service ### Install VirtualBox hypervisor We will install virtualbox 5.* via official reposiories ``` @@ -21,7 +21,7 @@ $ apt-get update $ sudo apt-get install virtualbox virtualbox-ext-pack ``` ### Install Kubectl We will install kubectl from official repositories. Recommened so you will get updates via apt. ``` @@ -33,7 +33,7 @@ $ sudo apt-get update && sudo apt-get install -y kubectl $ kubectl version ``` ### Install Minikube Download minukube binary directly from Google repositories. ``` $ curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube @@ -42,13 +42,13 @@ $ minikube version $ exit ``` ### Start Kubernetes Cluster loccally with Minikube Create and run Kubernetes cluster. This will take some few minutes depending on your Internet connection. ``` $ minikube start ``` ### Test Kubernetes service We test our cluster running a demo service ``` $ kubectl cluster-info @@ -62,12 +62,18 @@ $ kubectl delete deployment hello-minikube $ minikube stop ``` ### Adds Kubectl command 'k' alias to bash (optional) Using command aliases for minikube and kubectl, example: "mk start", "k get po". Note: You need to restart your bash terminal to see aliases working. ``` $ echo "alias k='kubectl'" >> ~/.bash_aliases $ echo "alias mk='minikube'" >> ~/.bash_aliases ``` ### Documentation Reference - - https://kubernetes.io/docs/tasks/tools/install-minikube/ - https://kubernetes.io/docs/tasks/tools/install-kubectl/ - https://linuxhint.com/install-minikube-ubuntu/ - https://askubuntu.com/questions/17536/how-do-i-create-a-permanent-bash-alias - https://websiteforstudents.com/install-virtualbox-latest-on-ubuntu-16-04-lts-17-04-17-10/ -
Gonzalo Plaza revised this gist
Jul 19, 2018 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,6 +14,7 @@ We will install virtualbox 5.* via official reposiories $ sudo apt-get update $ sudo apt remove virtualbox* $ 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 su $ echo "deb https://download.virtualbox.org/virtualbox/debian xenial contrib" >> /etc/apt/sources.list $ apt-get update -
Gonzalo Plaza created this gist
Jul 19, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,72 @@ # Minikube Installation on Ubuntu 16.04 LTS Overview: 1. Install hypervisor (Virtualbox) 2. Get and install Kubectl (repositories) 3. Get and install Minikube last version 4. Start and Test Minikube local cluster and expose demo service ## Install VirtualBox hypervisor We will install virtualbox 5.* via official reposiories ``` $ sudo apt-get update $ sudo apt remove virtualbox* $ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - $ sudo su $ echo "deb https://download.virtualbox.org/virtualbox/debian xenial contrib" >> /etc/apt/sources.list $ apt-get update $ sudo apt-get install virtualbox virtualbox-ext-pack ``` ## Install Kubectl We will install kubectl from official repositories. Recommened so you will get updates via apt. ``` $ sudo apt-get update && sudo apt-get install -y apt-transport-https $ curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - $ sudo touch /etc/apt/sources.list.d/kubernetes.list $ echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list $ sudo apt-get update && sudo apt-get install -y kubectl $ kubectl version ``` ## Install Minikube Download minukube binary directly from Google repositories. ``` $ curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube $ sudo mv -v minikube /usr/local/bin $ minikube version $ exit ``` ## Start Kubernetes Cluster loccally with Minikube Create and run Kubernetes cluster. This will take some few minutes depending on your Internet connection. ``` $ minikube start ``` ## Test Kubernetes service We test our cluster running a demo service ``` $ kubectl cluster-info $ kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080 $ kubectl expose deployment hello-minikube --type=NodePort $ kubectl get services $ minikube service hello-minikube --url $ minikube dashboard $ kubectl delete service hello-minikube $ kubectl delete deployment hello-minikube $ minikube stop ``` ## Adds Kubectl command 'k' alias to bash (optional) Using command aliases for minikube and kubectl, example: "mk start", "k get po". Note: You need to restart your bash terminal to see aliases working. ``` $ echo "alias k='kubectl'" >> ~/.bash_aliases $ echo "alias mk='minikube'" >> ~/.bash_aliases ```