Create a Deployment

kubectl run command creates a Deployment that manages a Pod. The Pod runs (ad restart if needed, etc) a Container based on your hello-node:v1 Docker image

kubectl run hello-node --image=hello-node:v1 --port=8080

Check the result

kubectl get deployments
kubectl get pods
kubectl get events

Create a Service

By default, the Pod is only accessible by its internal IP address within the Kubernetes cluster. To make the hello-node Container accessible from outside the Kubernetes virtual network, you have to expose the Pod as a Kubernetes Service.

kubectl expose deployment hello-node --type=LoadBalancer

Check the result

kubectl get services

The --type=LoadBalancer flag indicates that you want to expose your Service outside of the cluster. On cloud providers that support load balancers, an external IP address would be provisioned to access the Service. On Minikube, the LoadBalancer type makes the Service accessible through the minikube service command.

Scale your app

Open your app via minikube service hello-node, again and again. You'll have the same Hello World from hello-node-65something55c-cbv6g!. Open another browser, or wipe your cache fully. You'll have another ID : kubernetes's Service is doing its jobs, load balancing + session affinity

Minikube plugins

Just to get a shot at some interesting stuff for Kubernetes, minikube addons list

Heapster

This will automagically collects stuff and display nice curves, via FOSS like InfluxDB, Grafana. Here are the sources