Andreas Koop
Feb 1 · 3 min read

Kubernetes is a popular container orchestration platform. This post is a short summary & reference for getting hands dirty on your local machine — in my case on a macOS.

Since Kubernetes is made for real world production demands there is a special distribution for local machines named Minikube. It runs on a single-node cluster inside a VM.


Make sure you have the following developer tools installed.

  • VirtualBox (at the time of writing version 6.0 worked for me)
  • homebrew (at the time of writing version 1.9.3)

(on macOS 10.14.2)

Install Minikube

Installation of Minikube is easy as follows

$ brew install kubernetes-cli
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.2", GitCommit:"cff46ab41ff0bb44d8584413b598ad8360ec1def", GitTreeState:"clean", BuildDate:"2019-01-13T23:15:13Z", GoVersion:"go1.11.4", Compiler:"gc", Platform:"darwin/amd64"}
The connection to the server localhost:8080 was refused - did you specify the right host or port?
$ brew cask install minikube
🍺 minikube was successfully installed!

Verify Minikube installation

$ minikube start
Starting local Kubernetes v1.13.2 cluster...
Everything looks great. Please enjoy minikube!

Looking into VirtualBox you should see a running VM “minikube”.

Next lets turn on the dashboard (Kubernetes Web UI) to get some more insights of the running single-node Kubernetes Cluster (yes I know there is not much to see.

$ minikube dashboard
Opening in your default browser...
Kubernetes Web UI

Test a container deployment

Now that there is a running Kubernetes Cluster lets see how to deploy some simple (good looking 😎) stuff

$ kubectl create deployment grafana-deployment --image=grafana/grafana
deployment.apps/grafana-deployment created
$ kubectl get pods
grafana-deployment-6696c557c6-ktx4s 1/1 Running 0 30s
$ kubectl get deployments
grafana-deployment 1/1 1 1 60s

The sample container (grafana) is already running but only accessible by its internal IP address. To make it accessible from outside it must be exposed through a Kubernetes service.

$ kubectl expose deployment grafana-deployment --type=LoadBalancer --port=3000
service/grafana-deployment exposed
$ kubectl get services
grafana-deployment LoadBalancer <pending> 3000:30285/TCP 52s
kubernetes ClusterIP <none> 443/TCP 61m

On Minikube the container deployment now simply can be accessed by

$ minikube service grafana-deployment
Opening kubernetes service default/grafana-deployment in default browser…

With the default admin / admin you are able to start exploring Grafana. e.g. Visualizing some metrics of the TestDB.

Grafana Sample Dashboard Panel

Clean up

Do not forget to free resources on your machine

$ minikube stop
Stopping local Kubernetes cluster...
Machine stopped.


With a handful commands a single-node Kubernetes Cluster is up and running. It is the smallest possible Kubernetes installation (Minikube) . Do not run this in production.

This Post is brought to you by from our lovely Follow us on for more cool 😎 things.

Further information


From time to time, we post about the aspects that concern, amaze and suprise our developers during their day-to-day work.

Andreas Koop

Written by

Developer, Architect, Enabler, CEO at enpit.


From time to time, we post about the aspects that concern, amaze and suprise our developers during their day-to-day work.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade