Enable Specific API Versions When Starting Minikube

The Minikube tool is a wonderful resource when you need to run a Kubernetes cluster locally. It was very convenient for our team when we needed to recreate an existing deployment.

In our case, the first thing we needed to specify was the version. The Minikube documentation explains how to do this, and it was pretty straightforward. We could easily override the version and start a local cluster with:


$ minikube start --kubernetes-version v1.7.15

Unfortunately, when trying to apply our existing deployment definitions, we realized that the correct apiVersion was not enabled for our deployment. In our case, it was batch/v2alpha1 that was unavailable.

While the documentation does explain how to do more complex configuration, finding the exact setting we wanted took a little bit of extra searching.

Eventually, we discovered all the possible options we could configure on the API server. After a little bit of trial-and-error with the syntax, we got the cluster running as desired with:


$ minikube start --kubernetes-version v1.7.15 --extra-config=apiserver.runtime-config=batch/v2alpha1

With that, we were able to use batch/v2alpha1 in our deployment definitions without issue.

Minikube has been useful for us, and Kubernetes itself has been excellent to learn. It’s a powerful tool, so if you have any other Kubernetes tips or resources, please share in the comments below!