Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

document local minikube. Fixes https://github.com/tilt-dev/tilt/issues/3193 #1

Merged
merged 1 commit into from
Sep 22, 2020

Conversation

nicks
Copy link
Member

@nicks nicks commented Sep 21, 2020

Hello @maiamcc,

Please review the following commits I made in branch nicks/minikube:

f637541 (2020-09-21 18:04:23 -0400)
document local minikube. Fixes tilt-dev/tilt#3193

Code review reminders, by giving a LGTM you attest that:

  • Commits are adequately tested
  • Code is easy to understand and conforms to style guides
  • Incomplete code is marked with TODOs
  • Code is suitably instrumented with logging and metrics

@nicks
Copy link
Member Author

nicks commented Sep 21, 2020

a ton of this is just copied and pasted from the work we did on kind-local
https://github.com/tilt-dev/kind-local

i found that the minikube instructions recommended a bad approach, and the setup was very manual

@nicks nicks force-pushed the nicks/minikube branch 3 times, most recently from 97add51 to 00df6cc Compare September 21, 2020 22:30
@nicks
Copy link
Member Author

nicks commented Sep 21, 2020

unforuntately, had to back out the circleci test due to a minikube bug

@nicks
Copy link
Member Author

nicks commented Sep 21, 2020

there's some discussion here kubernetes/minikube#7420, there might be a workaround, but going to do it on a separate pr

@maiamcc
Copy link

maiamcc commented Sep 22, 2020

...whoops I made a buncha comments straight on this commit, transferring them over to this PR :-/

Copy link

@maiamcc maiamcc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

[![Build Status](https://circleci.com/gh/tilt-dev/minikube-local/tree/master.svg?style=shield)](https://circleci.com/gh/tilt-dev/minikube-local)

When using Tilt with a [Minikube](https://minikube.sigs.k8s.io/docs/) cluster,
we recommend using a local registry for faster image pushing and pulling.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

faster image pushing and pulling.

seems like you joinked this from a doc where the tradeoff was local registry vs. remote registry -- the main Q for minikube is about local registry vs. hooking into minikube docker, I think the docs should discuss that instead

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you overestimate how well most minikube users are going to understand the minikube feature set. simplified the explanation here a bit

README.md Outdated

1) Install [Minikube](https://minikube.sigs.k8s.io/docs/)

2) Copy the [minikube-with-registry.sh](minikube-with-registry.sh) somewhere on your path.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2) Copy the [minikube-with-registry.sh](minikube-with-registry.sh) somewhere on your path.
2) Copy the [minikube-with-registry.sh](minikube-with-registry.sh) script somewhere on your path.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


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

[Tilt](https://tilt.dev) will automatically detect the local registry created by this script.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought Tilt's default was to hook into the minikube docker daemon -- if it detects a local registry, does that behavior override that behavior?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope!

we should change tilt to prefer the local registry over the docker daemon.

HOWEVER! This script uses containerd, so Tilt will detect that there's no docker daemon connect to

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh clever! Nice. Can you open an issue/story for the local-registry-over-minikube-docker behavior?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README.md Outdated

We also have instructions for setting Minikube up with a local registry in

- [.circleci](.circleci)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...why is this a bullet point?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed! this is vestigial from when i thought circleci would work 😬

@nicks nicks merged commit 68903c6 into master Sep 22, 2020
@nicks nicks deleted the nicks/minikube branch September 22, 2020 19:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs for Minikube + local registry (was: Allow tilt to copy image from host)
2 participants