Home

Awesome

minikube-local

UPDATE(2023-04-03)

As of Minikube 1.26, this script no longer works, due to upstream breaking API changes.

Please migrate to ctlptl, which checks the version of Minikube and uses the right config.

This repo will be archived for posterity.


The best way to set minikube up for local development

Build Status

When using Tilt with a Minikube cluster, we recommend using a local registry for faster image pushing and pulling.

This repo documents the best way to set it up.

Why use Minikube with a local registry?

Minikube offers many different ways to get your app into the cluster.

Using a local registry is the best method for iterative app development.

Over all these approaches, a local registry has good speed, incremental caching, and few footguns. But setting it up is awkward and fiddly. This script makes it easy.

How to Try It

  1. Install Minikube

  2. Copy the minikube-with-registry.sh script somewhere on your path.

  3. Create a cluster with minikube-with-registry.sh. Currently it creates the registry at port 5000.

minikube-with-registry.sh
  1. Try pushing an image.
docker tag alpine localhost:5000/alpine
docker push localhost:5000/alpine

You can now use the image name localhost:5000/alpine in any resources you deploy to the cluster.

Tilt will automatically detect the local registry created by this script.

Thanks to

High five to MicroK8s for the initial local registry feature that inspired a lot of this work.

The Kind team ran with this, writing up documentation and hooks for how to set up a local registry with Kind.

This repo adapts the Kind team's approach and applies the local registry configmap, so that tools like Tilt can discover the local-registry. This protocol is a Kubernetes Enhancement Proposal.

License

Copyright 2020 Windmill Engineering

Licensed under the Apache License, Version 2.0