Skip to content

Instantly share code, notes, and snippets.

@yyunikov
Forked from gjyoung1974/kube.sh
Created May 15, 2018 05:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yyunikov/60505c9f4b45329d75c774819fce74fa to your computer and use it in GitHub Desktop.
Save yyunikov/60505c9f4b45329d75c774819fce74fa to your computer and use it in GitHub Desktop.
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