Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Initialize Minikube - Local Kubernetes cluster on macOS
#!/bin/bash
export KUBECONFIG=$HOME/.kube/config
#Download an OSX binary minikube
# minikube-darwin-amd64
#
# https://github.com/kubernetes/minikube/releases
# Put it somewhere that you can run it from: /usr/local/bin/minikube && chmod +x /usr/local/bin/minikube
# Download Docker Machine Hyperkit Driver
# https://github.com/kubernetes/minikube/releases
#
# 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
# give Minikube at least 8gb's ram && have it use HyperKit drivers && enable some plugins
# Allways use this script vs $ minikube start directly or you may forget the command line args below
# and corrupt your cluster
minikube start --memory=8192 --vm-driver=hyperkit --extra-config=controller-manager.ClusterSigningCertFile="/var/lib/localkube/certs/ca.crt" \
--extra-config=controller-manager.ClusterSigningKeyFile="/var/lib/localkube/certs/ca.key" \
--extra-config=apiserver.Admission.PluginNames=NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment