## Minikube Setup `minikube start`: * Downloads a Virtualbox VM ISO for `minikube` * Starts a VM * Runs a local Kubernetes cluster using this VM. ## Initial Setup `kubectl cluster-info`: Check that kubectl is properly configured. ``` Kubernetes master is running at https://192.168.99.100:8443 To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'. ``` `kubectl run hello-world --replicas=2 --labels="run=load-balancer-example" --image=gcr.io/google-samples/node-hello:1.0 --port=8080` Runs a Dockerized `hello-world` service with 2 replicas. ## Getting Information * `kubernetes get`: List all `get` commands. * `kubernetes describe`: List all `describe` commands. * `kubectl get services`: Get list of services running in cluster * `kubectl get deployments`: Get summarized current state and desired state of replicas of deployments. * `kubectl describe deployments [DEPLOYMENT_NAME]` Get details of all deployments, or optionally one deployment named `DEPLOYMENT_NAME`. * `kubectl describe hpa`: Describe the `HorizontalPodAutoscaler` objects. ## Scaling * `kubectl scale --replicas=2 deployments/hello-minikube`: Scale a deployment named `hello-minikube` to 2 replicas. * `kubectl autoscale deployment foo --min=2 --max=5 --cpu-percent=80`: Create an Horizontal Pod Autoscaler that automatically scales the deployment between 2 and 5 replicas when CPU utilization exceeds 80%. ## Heapster (and other Minikube Addons) * `minikube addons enable heapster`: Enable Heapster within Minikube (it's disabled by default) * `minikube addons open dashboard`: Open the Kubernetes Dashboard (opens in a browser window). * `minikube addons open heapster`: Open the Heapster Dashboard (opens Grafana in a browser window).