⇐ ⇐ WindMover Mac OS
This is a step-by-step guide to installing and running Kubernetes on your Mac so that you can develop applications locally.
0xC3 in Mac OS Roman and Mac OS Cyrillic; 0xFB (Alt+251) in Code page 437 and Code page 866 (but not Code page 850) on DOS and the Windows console; 0xD6 in the Symbol font encoding; 02-69 (7-bit 0x2265, SJIS 0x81E3, EUC 0xA2E5) in Japanese JIS X 0208; 01-78 (EUC/UHC 0xA1EE) in Korean Wansung code; 01-44 (EUC 0xA1CC) in Mainland Chinese GB 2312. REAL4 EPSILON, REAL8 EPSILON, SQRT REAL8 EPSILON, CUBE ROOT REAL8 EPSILON, FP REGISTER EXTRA PRECISION Macros for system identi cation: OC SYSTEM TYPE One of OC UNIX or OC WINDOWS. OC SYSTEM SUBTYPE For unix systems, this is either OC VANILLA (general unix) or OC DARWIN (Mac OS X). For Windows systems, this is generally OC WINNT, unless one.
You will be guided through running and accessing a Kubernetes cluster on your local machine using the following tools:
The only pre-requisite for this guide is that you have Homebrew installed. Homebrew is a package manager for the Mac. You’ll also need Homebrew Cask, which you can install after Homebrew by running brew tap caskroom/cask
in your Terminal.
Install Docker for Mac. Docker is used to create, manage, and run our containers. It lets us construct containers that will run in Kubernetes Pods.
Install VirtualBox for Mac using Homebrew. Run brew cask install virtualbox
in your Terminal. VirtualBox lets you run virtual machines on your Mac (like running Windows inside macOS, except for a Kubernetes cluster.)
Skip to step three if everything has worked to this point.
In my case, I already had the non-Homebrew VirtualBox app installed which caused issues when trying to start minikube.
If you already have VirtualBox installed, start the installation as before with brew cask install virtualbox
. You will get a warning that confirms this saying Warning: Cask 'virtualbox' is already installed.
. Once this is confirmed, you can reinstall VirtualBox with Homebrew by running brew cask reinstall virtualbox
.
If you happen to have VirtualBox already running when you do this, you could see an error saying Failed to unload org.virtualbox.kext.VBoxDrv - (libkern/kext) kext is in use or retained (cannot unload).
This is because the kernel extensions that VirtualBox uses were in use when the uninstall occurred. If you scroll up in the output of that command, beneath Warning! Found the following active VirtualBox processes:
you’ll see a list of the processes that need to be killed.
Kill each of these in turn by running kill first_column_number
(first_column_number
is the process identifier for that process).
Now re-run brew cask reinstall virtualbox
and it should succeed.
Install kubectl
for Mac. This is the command-line interface that lets you interact with Kuberentes. Run brew install kubectl
in your Terminal.
Install Minikube via the Installation > OSX instructions from the latest release. At the time of writing, this meant running the following command in Terminal…
Minikube will run a Kubernetes cluster with a single node.
Everything should work! Start your Minikube cluster with minikube start
. Then run kubectl api-versions
. If you see a list of versions, everything’s working! minikube start
might take a few minutes.
At this point, I got an error saying Error starting host: Error getting state for host: machine does not exist.
because I had previously tried to run Minikube. You can fix this by running open ~/.minikube/
to open Minikube’s data files, and then deleting and deleting the machines
directory. Then run minikube start
again.
You’ve installed all these tools and everything looks like it’s working. A quick explanation of how the components relate is needed.
kubectl
is the command line application that lets you interact with your Minikube Kubernetes cluster. It sends request to the Kubernetes API server running on the cluser to manage your Kubernetes environment. kubectl
is like any other application that runs on your Mac—it just makes HTTP requests to the Kubernetes API on the cluster.