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

Make it possible to install addons from alternate image repositories #8298

Closed
jgoeres opened this issue May 28, 2020 · 7 comments · Fixed by #9551
Closed

Make it possible to install addons from alternate image repositories #8298

jgoeres opened this issue May 28, 2020 · 7 comments · Fixed by #9551
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@jgoeres
Copy link

jgoeres commented May 28, 2020

I was just trying to start my minikube (after it again became unresponsive to kubectl for some reason, which I finally reported as #8300) when I noticed that the ingress-controller add on was in ImagePullBackOff:

$ kubectl get pods -A
NAMESPACE       NAME                                        READY   STATUS             RESTARTS   AGE
kube-system     coredns-5d4dd4b4db-jrjgv                    1/1     Running            0          15m
[...]
kube-system     nginx-ingress-controller-657fd58d97-rf859   0/1     ImagePullBackOff   0          9m39s
kube-system     storage-provisioner                         1/1     Running            0          15m


$ kubectl describe pod -n kube-system nginx-ingress-controller-657fd58d97-rf859
Name:           nginx-ingress-controller-657fd58d97-rf859
[...]
  Type     Reason     Age                   From               Message
  ----     ------     ----                  ----               -------
  Normal   Scheduled  3m43s                 default-scheduler  Successfully assigned kube-system/nginx-ingress-controller-657fd58d97-rf859 to m01
  Normal   Pulling    2m9s (x4 over 3m43s)  kubelet, m01       Pulling image "quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.26.1"
  Warning  Failed     2m9s (x4 over 3m42s)  kubelet, m01       Failed to pull image "quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.26.1": rpc error: code = Unknown desc = Error response from daemon: Get https://quay.io/v2/: EOF
  Warning  Failed     2m9s (x4 over 3m42s)  kubelet, m01       Error: ErrImagePull
  Warning  Failed     117s (x6 over 3m42s)  kubelet, m01       Error: ImagePullBackOff
  Normal   BackOff    104s (x7 over 3m42s)  kubelet, m01       Back-off pulling image "quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.26.1"

This problem was already reported here as well #8153

In general I think it should be possible for any addon that pulls images to specify an alternative image (not so much to use an alternative implementation, but to have backup registry) and an image pull secret. This seems currently not possible, at least for the ingress addon, I tried the addon configure command:

$ minikube addons configure ingress
* ingress has no available configuration options

Is there any way how this can be done?

That would allow people that use minikube in their internal process to host such images on internal registries, to not have a dependency on external systems.

@jgoeres jgoeres changed the title Make it possible to set an alternative image and pull secret for the "ingress" addon (or any addon that pulls images) Make it possible to set an alternative image and pull secret for the "ingress" addon (or any addon that pulls images) to have solution if the addons default registry is unavailable May 28, 2020
@jgoeres jgoeres changed the title Make it possible to set an alternative image and pull secret for the "ingress" addon (or any addon that pulls images) to have solution if the addons default registry is unavailable Make it possible to set an alternative image and pull secret for the "ingress" addon (or any addon that pulls images) to have solution if the addon's default registry is unavailable May 28, 2020
@tstromberg tstromberg added the kind/feature Categorizes issue or PR as related to a new feature. label May 28, 2020
@tstromberg
Copy link
Contributor

There is technically an --image-repository flag to minikube start, but not every addon supports it. Ingress is one of these.

The other issue here is that there is no way to specify the image repository after minikube has started up.

@tstromberg tstromberg changed the title Make it possible to set an alternative image and pull secret for the "ingress" addon (or any addon that pulls images) to have solution if the addon's default registry is unavailable Add --image-repository support to minikube addons command May 29, 2020
@tstromberg tstromberg changed the title Add --image-repository support to minikube addons command Make it possible to install addons from alternate image repositories May 29, 2020
@tstromberg tstromberg added the priority/backlog Higher priority than priority/awaiting-more-evidence. label May 29, 2020
@jgoeres
Copy link
Author

jgoeres commented Jun 2, 2020

THX for pointing out the --image-repository flag.
Alas, our internal registry does not allow anonymous pull access.
I just went over the various switches of minikube start - I didn't see an obvious way to pass in a registry secret/docker login credentials. Is there any way to do this?

@medyagh
Copy link
Member

medyagh commented Jun 8, 2020

THX for pointing out the --image-repository flag.
Alas, our internal registry does not allow anonymous pull access.
I just went over the various switches of minikube start - I didn't see an obvious way to pass in a registry secret/docker login credentials. Is there any way to do this?

@jgoeres if you are using a private registery that needs creds, you would need to add that as a kuberentes secret so kuberentes can talk to it.

does this docs on using private registery help ?
https://minikube.sigs.k8s.io/docs/handbook/registry/

or this example in aws https://minikube.sigs.k8s.io/docs/tutorials/configuring_creds_for_aws_ecr/

@clementDele
Copy link

+1

I run my Minikube 1.11.0 on an offline machine. I was able to pull control-plane images from my private Docker registry with the --image-repository flag but it seems impossible to change the repository for the dashboard:v2.0.0 and metrics-scraper:v1.0.2. Despite the flag, they keep trying to pull from registry1.docker.io...

A dirty workaround would be to docker load those images directly on the Minikube VM i guess. This is obviously not a viable long term solution ....

Is there a better solution at the moment ? Thanks

@sharifelgamal sharifelgamal added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Jul 1, 2020
@medyagh
Copy link
Member

medyagh commented Jul 1, 2020

I would accept any PR that makes this possible

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 29, 2020
@yehiyam
Copy link
Contributor

yehiyam commented Oct 25, 2020

I'm creating a PR for that
/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants