Polyaxon v3 is coming →

Minikube for local Kubernetes development

How to use Minikube for local Kubernetes development, basic cluster operations, and testing ML workloads before moving to shared infrastructure.

June 25, 2024by Polyaxon
Jun 25, 2024

Minikube for local Kubernetes development

How to use Minikube for local Kubernetes development, basic cluster operations, and testing ML workloads before moving to shared infrastructure.

Picture

Minikube is the fastest way to get a local Kubernetes cluster without asking anyone for cloud credentials. It is useful for learning Kubernetes, testing manifests, and reproducing small workload issues before sending them to a shared cluster.

It is not production. That is the point.

What Minikube provides

Minikube runs a Kubernetes cluster on a local machine using a driver such as Docker, HyperKit, Hyper-V, VirtualBox, or another supported runtime. Most developers can start with the Docker driver.

minikube start

Once the cluster is running, you can use your normal kubectl binary or the bundled Minikube kubectl wrapper:

minikube kubectl -- get pods -A

Deploy a basic app

A small deployment is enough to verify that the cluster works:

kubectl create deployment hello-minikube --image=nginx
kubectl expose deployment hello-minikube --type=NodePort --port=80
minikube service hello-minikube

That gives you a local service endpoint and a fast sanity check for networking, scheduling, and image pulls.

Useful commands

Start with the commands that answer operational questions:

minikube status
minikube profile list
kubectl get nodes
kubectl get pods -A

For multi-node testing, Minikube can add nodes:

minikube node add

That is useful when testing scheduling behavior, node selectors, taints, tolerations, and failure scenarios.

Stopping and deleting clusters

Use stop when you want to pause the cluster and keep its state:

minikube stop

Use delete when you want to remove it:

minikube delete

Avoid minikube delete --all --purge unless you actually want to remove cached state and make future starts slower.

Using Minikube with Polyaxon

Minikube is useful for local testing of Kubernetes behavior and lightweight Polyaxon experiments. It will not behave like a production cluster with managed storage, GPUs, autoscaling, ingress, and strict security policy. Treat it as a development tool, not a staging environment in disguise.