Maxikube is a Kubernetes lab environment based on Vagrant, Ansible and VirtualBox. The main folder contains Vagrant code to stand up a single Kubernetes master server instance with 2 nodes. The number of nodes is configurable.
A lot of stuff in this repository is based on this blog post:
The pre-requistes for this are Ansible, Vagrant and VirtualBox, installed on the PC you intend to run it on, and 4 GB of RAM.
$ git clone https://github.com/mzima/maxikube
$ vagrant up
$ vagrant halt
$ vagrant destroy
The main folder contains a config.yaml
file, which can be used to configure your Maxikube Kubernetes cluster. The following things can be changed:
- K8s nodes count
- master/nodes: number of cpus
- master/nodes: memory allocation
# Maxikube Configuration
master:
cpus: 2
memory: 2048
node:
count: 2
cpus: 1
memory: 1024
Ssh into the master node to use kubectl from there:
$ vagrant ssh master-1
$ kubectl get all
You need to install kubectl as described here: https://kubernetes.io/docs/tasks/tools/install-kubectl/.
The Vagrant script will automatically save the Kubernetes context config file to ~/.kube/config-maxikube
on your local machine, however you might have to modify your $KUBECONFIG
environment variable:
$ export KUBECONFIG=~/.kube/config-maxikube:$KUBECONFIG
$ kubectl get all