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

minikube offline deployment metric-server addon imagePullPolicy is set to Always #10064

Closed
ganchandrasekaran opened this issue Dec 30, 2020 · 1 comment · Fixed by #10096
Closed

Comments

@ganchandrasekaran
Copy link

ganchandrasekaran commented Dec 30, 2020

Steps to reproduce the issue:

1.Minikube deployment in offline environment. Where the VM has no access to internet.
2. Trying to make metric-server Addon work.
3. Add cache manually for metric-server image.
minikube cache add k8s.gcr.io/metrics-server-amd64:v0.2.1
4. Still metric-server pod is crashing
kube-system metrics-server-77fddcc57b-4rvsx 0/1 ImagePullBackOff 0 3m48s
5. Edit deployment and change imagePullPolicy to IfNotPresent.
kubectl edit deployments -n kube-system metrics-server
6. Now metrics-server pod is running,
kube-system metrics-server-6587bccc78-gqwv6 1/1 Running 0 4s
7. After 10 seconds the deployment metrics-server changes pack to Always
kubectl get deployments -n kube-system metrics-server -o yaml | grep imagePullPolicy
imagePullPolicy: Always
8. Then the pod is again crashing..
kube-system metrics-server-77fddcc57b-4rvsx 0/1 ImagePullBackOff 0 3m48s

same problems for other addons: e.g. registry

@ganchandrasekaran
Copy link
Author

Just a note, for existing version of minikube I do following to fix this issue..

1, SSH into specific minikube
$ minikube ssh -p testa

2, Edit the addon yaml file in the following location and change policy to IfNotPresent

$ sudo vi /etc/kubernetes/addons/metric-server-deployment.yaml
# change imagePullPolicy to "IfNotPresent"
# then registry-creds should start working.. 

3, Also now Edit deployment and change imagePullPolicy to IfNotPresent.
kubectl edit deployments -n kube-system metrics-server

This should fix the issue..

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

Successfully merging a pull request may close this issue.

1 participant