Kubernetes/minikube

From Ever changing code
Jump to navigation Jump to search

Features v1.2.0

  • LoadBalancer - using minikube tunnel
  • Multi-cluster - using minikube start -p <name>
  • NodePorts - using minikube service
  • Persistent Volumes
  • Ingress
  • RBAC
  • Dashboard - minikube dashboard
  • Container runtimes - start --container-runtime
  • Configure apiserver and kubelet options via command-line flags

Install on Linux

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && sudo install minikube-linux-amd64 /usr/local/bin/minikube
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 39.8M  100 39.8M    0     0   160k      0  0:04:14  0:04:14 --:--:--  174k

Usage

minikube start     #start a cluster by running
minikube dashboard #access Kubernetes Dashboard within Minikube

#Use kubectl to interact with the local cluster
kubectl run               hello-minikube --image=k8s.gcr.io/echoserver:1.4 --port=8080
kubectl expose deployment hello-minikube --type=NodePort #Exposing a service as a NodePort

#minikube makes it easy to open this exposed endpoint in your browser
minikube service hello-minikube

#Start a second local cluster:
minikube start -p cluster2

minikube stop   #stop your local cluster
minikube delete #delete your local cluster

Addons

minikube addons enable heapster #get some insight into CPU

References