Skip to content

Minikube

Shakeout or debug your container services prior to deploying to Kubernetes.

Note

All Kubernetes manifests are expected to be in the MAKESTER__K8_MANIFESTS directory (defaults to $MAKESTER__WORK_DIR/k8s/manifests).

Warning

Care must be taken when managing mulitple Kubernetes contexts. kubectl will operate against the active context.

The Makester minikube subsystem is an optional facility as it requires binaries that you will need to install yourself. In the case of Kubernetes minikube, you can get the link to the installation notes to minikube with:

make print-MAKESTER__MINIKUBE_EXE_INSTALL
print-MAKESTER__MINIKUBE_EXE_INSTALL=https://kubernetes.io/docs/tasks/tools/#minikube

For Kubernetes cluster interactions:

make print-MAKESTER__KUBECTL_EXE_INSTALL
print-MAKESTER__KUBECTL_EXE_INSTALL=https://kubernetes.io/docs/tasks/tools/

The Makester minikube subsystem help lists the available commands:

make k8s-help

Command Reference

Check Minikube Local Cluster Status

make mk-status

Start Minikube Locally and Create a Cluster (docker driver)

make mk-start

Access the Kubernetes Dashboard (Ctrl-C to stop)

make mk-dashboard

Stop Minikube Local Cluster

make mk-stop

Delete Minikube Local Cluster

make mk-del

Get Service Access Details

Note

Only applicable if LoadBalancer type is specified in your Kubernetes manifest.

make mk-service

Check Current kubectl Context

make kube-context

Note

Current context name is delimited with the *:

 CURRENT   NAME                CLUSTER             AUTHINFO                                          NAMESPACE
           SupaAKSCluster      SupaAKSCluster      clusterUser_RESOURCE_GROUP_SupaAKSCluster
 *         minikube            minikube            minikube

Change kubectl Context

make kube-context-set MAKESTER__KUBECTL_CONTEXT=<context-name>

Change kubectl to the minikube Context

make kube-context-set

Create Kubernetes Resource(s)

Builds all manifest files in MAKESTER__K8_MANIFESTS directory:

make kube-apply

Delete Kubernetes Resource(s)

Deletes all manifest files in MAKESTER__K8_MANIFESTS directory:

make kube-del

View the Pods and Services

make kube-get

Variables

MAKESTER__MINIKUBE_EXE_NAME

The name of the binary Makester will search for in your PATH (defaults to minikube).

MAKESTER__MINIKUBE_EXE_NAME can be overridden if you have special requirements, or want to use a minikube executable that is not in your PATH. Just set MAKESTER__MINIKUBE_EXE_NAME to your prefered value in your Makefile:

MAKESTER__MINIKUBE_EXE_NAME := /opt/minikube/bin/minikube

MAKESTER__MINIKUBE_EXE_INSTALL

URL link that provides the instructions for installing the minikube binary. To print the URL link:

make print-MAKESTER__MINIKUBE_EXE_INSTALL

MAKESTER__MINIKUBE

The path to the minikube binary as determined by Makester. Use MAKESTER__MINIKUBE for custom minikube commands in your own Makefile.

Note

Override MAKESTER__MINIKUBE has no effect as it is dynamically generated by Makester based on the value of MAKESTER__MINIKUBE_EXE_NAME.

MAKESTER__KUBECTL_EXE_NAME

The name of the binary Makester will search for in your PATH (defaults to kubectl).

MAKESTER__KUBECTL_EXE_NAME can be overridden if you have special requirements, or want to use a kubectl executable that is not in your PATH. Just set MAKESTER__KUBECTL_EXE_NAME to your prefered value in your Makefile:

MAKESTER__KUBECTL_EXE_NAME := /opt/kubectl/bin/kubectl

MAKESTER__KUBECTL_EXE_INSTALL

URL link that provides the instructions for installing the kubectl binary. To print the URL link:

make print-MAKESTER__KUBECTL_EXE_INSTALL

MAKESTER__KUBECTL

The path to the kubectl binary as determined by Makester. Use MAKESTER__KUBECTL for custom kubectl commands in your own Makefile.

Note

Override MAKESTER__KUBECTL has no effect as it is dynamically generated by Makester based on the value of MAKESTER__KUBECTL_EXE_NAME.


top