Skip to content

Instantly share code, notes, and snippets.

@John-Lin
Created December 9, 2017 11:26
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save John-Lin/1dc063b6743f311561f2fe587e035c33 to your computer and use it in GitHub Desktop.
Save John-Lin/1dc063b6743f311561f2fe587e035c33 to your computer and use it in GitHub Desktop.
How to Minikube

Minikube

Installation

$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.24.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/

Quickstart

# macOS
$ minikube start --vm-driver=hyperkit
# or
$ minikube start --vm-driver=virtualbox

# Linux
$ minikube start --vm-driver=kvm2
# or
$ minikube start --vm-driver=virtualbox
# or 
$ minikube start --vm-driver=none
# runs the Kubernetes components on the host and not in a VM. Docker is required to use this driver but no hypervisor

Services, Status & Showing IPs

$ minikube ip
192.168.64.5

$ minikube status
minikube: Running
cluster: Running
kubectl: Correctly Configured: pointing to minikube-vm at 192.168.64.5

# To access a service exposed via a node port
# Open a browser for cv-server service
$ minikube service cv-server

# To access the Kubernetes Dashboard
$ minikube dashboard

Kubectl context

$ kubectl config use-context minikube
# or 
$ kubectl get pods --context=minikube

Stop, Destroy & Cleanup

$ minikube stop
$ minikube delete
$ rm -rf ~/.minikube

Issues

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