Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check on local registry for new version #6

Open
sgandon opened this issue Mar 25, 2019 · 8 comments
Open

check on local registry for new version #6

sgandon opened this issue Mar 25, 2019 · 8 comments

Comments

@sgandon
Copy link

sgandon commented Mar 25, 2019

Hello,
We are looking for a solution so that our developers can deploy some kubernetes manifest on their local machine using docker-for-desktop (windows/mac) or minikube.
and then been able to build a new image locally and have their pod automatically restarted with this new image.
I have performed some test using imago but was not sucessful.
Any idea on how to make this work ?

@philpep
Copy link
Owner

philpep commented Mar 25, 2019

Hi, I guess this is not working with imago because you don't have tls or a verified certificate on your registry server.

In your case imago might not the best tool to use, did you considered kubectl set image deployment/yourapp image=registry/image ?

@sgandon
Copy link
Author

sgandon commented Mar 25, 2019

I may not have been clear, but everything is local to my machine, I don't want to use a remote registry but only the local docker registry.
The idea is that when I build a new image locally (without pushing it to any remote registry) it will be automatically be used inside my local docker-for-mac k8s cluster.

@sgandon sgandon closed this as completed Mar 25, 2019
@sgandon sgandon reopened this Mar 25, 2019
@sgandon
Copy link
Author

sgandon commented Mar 25, 2019

I have used the kubernetes imagepullPolicy: Never to make sure that it uses the local version of my image.

@philpep
Copy link
Owner

philpep commented Mar 25, 2019

Oh, ok you're building inside the single-node cluster.

Maybe I can do something in imago to make this works.
But I still think you can do this in a single shell command by using kubectl set image and docker client cli to get the sha256 image digest.

@sgandon
Copy link
Author

sgandon commented Mar 25, 2019

ha ok. I'll try it manually.
thanks.

@sgandon
Copy link
Author

sgandon commented Mar 28, 2019

so I managed to make it work with 2 simple commands:

>docker inspect --format='{{index .RepoDigests 0}}' registry/webapp:1.0.0-20181114170846-gd2eb6d0
registry/webapp@sha256:3423b8d2b9a04c8a7b69b2c5c2bb386bf0213943004a7de0a45ba187a92b7235
>kubectl set image deployment test-webapp test-webapp=registry/webapp@sha256:3423b8d2b9a04c8a7b69b2c5c2bb386bf0213943004a7de0a45ba187a92b7235

but that would be great to have it automated for all images using a selector just like in imago.
Do you think that would be an enhancement for imago ?

@philpep
Copy link
Owner

philpep commented Mar 28, 2019

Great. Yes I think we can add support for local docker registry.

@andreigec
Copy link

is there also a way to accept self signed, or ignore ssl certs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants