How to do it...

macOS doesn't have an official package management tool, such as yum and apt-get on Linux. But there are some useful tools available for macOS. Homebrew (https://brew.sh) is the most popular package management tool and manages many open source tools, including minikube.

In order to install Homebrew on macOS, perform the following steps:

  1. Open the Terminal and then type the following command:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. Once installation is completed, you can type /usr/local/bin/brew help to see the available command options.

If you just install or upgrade Xcode on your macOS, the Homebrew installation may stop. In that case, open Xcode to accept the license agreement or type sudo xcodebuild -license beforehand.

  1. Next, install the hyperkit driver for minikube. At the time of writing (February 2018), HomeBrew does not support hyperkit; therefore type the following command to install it:
$ curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-hyperkit 
&& chmod +x docker-machine-driver-hyperkit
&& sudo mv docker-machine-driver-hyperkit /usr/local/bin/
&& sudo chown root:wheel /usr/local/bin/docker-machine-driver-hyperkit
&& sudo chmod u+s /usr/local/bin/docker-machine-driver-hyperkit
  1. Next, let's install the Kubernetes CLI. Use Homebrew with the following comment to install the kubectl command on your macOS:
//install kubectl command by "kubernetes-cli" package
$ brew install kubernetes-cli

Finally, you can install minikube. It is not managed by Homebrew; however, Homebrew has an extension called homebrew-cask (https://github.com/caskroom/homebrew-cask) that supports minikube.

  1. In order to install minikube by homebrew-cask, just simply type the following command:
//add "cask" option
$ brew cask install minikube
  1. If you have never installed Docker for Mac on your machine, you need to install it via homebrew-cask as well
//only if you don't have a Docker for Mac
$ brew cask install docker

//start Docker
$ open -a Docker.app
  1. Now you are all set! The following command shows whether the required packages have been installed on your macOS or not:
//check installed package by homebrew
$ brew list
kubernetes-cli


//check installed package by homebrew-cask
$ brew cask list
minikube
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.64.172