Skip to content

Instantly share code, notes, and snippets.

@ssro
Last active June 9, 2021 04:04
Show Gist options
  • Save ssro/ba3b50fbcf3f933054472fc37933ab9d to your computer and use it in GitHub Desktop.
Save ssro/ba3b50fbcf3f933054472fc37933ab9d to your computer and use it in GitHub Desktop.
Minikube on MacOS

Minikube - a quick and dirty guide (MacOS)

Prerequisites

Install brew by following the install steps here

Install docker for mac from here and start it

Install VirtualBox from here. A system restart is needed to activate VBox modules after installation

Install kubernetes client by running brew install kubernetes-cli

Start clean

NOTE: This will delete any previous minikube install and everything associated with it

$ minikube stop
$ minikube delete
$ rm -rf /usr/local/bin/minikube

Install minikube

$ brew install minikube

Start minikube

RBAC

$ minikube start --kubernetes-version v1.19.11 --extra-config=apiserver.authorization-mode=Node,RBAC

Wait few minutes for everything to come up

RBAC & Cilium networking

$ minikube start --kubernetes-version v1.19.11 --extra-config=apiserver.authorization-mode=Node,RBAC --cni=cilium

Link to local docker daemon

$ eval $(minikube docker-env)

NOTE: Remember to turn off the imagePullPolicy: Always, as otherwise Kubernetes won't use images you've built locally. This means imagePullPolicy: Never

minikube is ready!

Grab yourself a coffee and start deploying apps!

Stop minikube

$ minikube stop

Delete minikube machine

$ minikube delete

Self help

$ minikube --help

Refs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment