Learning Kubernetes with Minikube
If you heard about Kubernetes, chances are you will know the daunting tasks behind setting up a Kubernetes cluster. The steps may feel a bit complicated for someone that just started to explore the world of Kubernetes. Minikube is meant to bridge the gap on this steep learning curve.
Minikube is not meant to be used on production. It is designed to be used for development and self study purposes. It is a simple solution to quickly setup a single node Kubernetes cluster.
Before we moving into Minikube, make sure you that you have installed one of the Container manager, like Docker, VMWare or Hyperkit. Then on your favorite terminal:
brew install minikube
minikube start
Voila! Your personal Kubernetes cluster is ready to serve you at your fingertips!
Minikube is a contained environment, you may treat it as just another virtual machine with Kubernetes lite version installed. As such, there are some commands that can be used to interact with Minikube
# ssh into minikube vm
minikube ssh # get minikube private ip address
minikube ip
Apart from that, you may also tweak Minikube according to your likings and needs
# start on specific k8s version
minikube start — kubernetes-version v1.8.6# setting driver, cpu & mem,
# only take effects after recreating the minikube
# `minikube delete` and `minikube start`
minikube config set driver hyperkit
minikube config set cpus 2
minikube config set memory 2048# View all manually set config, empty if never set before
minikube config view
- driver: hyperkit
- memory: 2048
- cpus: 2
Hope this article will help your journey on Kubernetes :)