Closed franck-mosse closed 1 year ago
We should review our addons and inherit image pull policy from k8s api property.
@franck-mosse Rke should always use the configured private registry for all the images it requires. How do you use the private registry with your setup ?
@franck-mosse is the metrics-server in your docker registry?
we should check that metrics-server is listed as a required image
@deniseschannon All the required images are loaded in the docker internal registry of all our VMs where we would like to deploy K8S with RKE. We don't have any external registry to connect to at k8s installation step. All images needed are still uploaded in the Vms at build stage, and when the vm is up all images are still available in docker. The problem is that imagePullPolicy is set to 'Always' by default and this implies a check of the image version at pod deployment. An 'IfNotPresent' imagePullPolicy will not generate the issue.
We have the same usecase as @franck-mosse, we preload all containers on the internal docker registries of the VM's so we don't need a private registry. The metrics-server will always try to pull the image, even if it is already present on the machine. Is it possible to add an option to change the imagePullPolicy
of the metrics-server in the configuration yaml file of the RKE cluster?
Bump this issue; we have the same problem. Would be nice to have a configurable global default image pull policy.
We also have this same issue.
The following work-around will patch the pull policy:
kubectl patch Deployment/metrics-server -n kube-system -p '{"spec": {"template": {"spec":{"containers":[{"name":"metrics-server","imagePullPolicy":"IfNotPresent"}]}}}}'
We still get the same issue here.
All system needed image are loaded previously on the host for deploying RKE. However, only metrics-server is trying to pull image and failed because of setting the imagepolicy to always
.
I can manually modify the yaml of deployment to fix it but I think there should be another way to change default config.
Yes, I've come across this issue as well in an air-gapped deployment. Thanks @timarnson for the simple patch command. It would be great to have this as a config option in the RKE deployment so we don't need the manual step.
This should be solved in v2.6 and v2.7
RKE version: v02.2
Rke deploys the metrics-server with an imagePullpolicy set to Always. As my cluster does not have access to internet , the deployment fails and the metrics server does not start becouse the image can not be pulled from ouside the cluster. Is there a way to update the default image policy at cluster deployment ?
For information, my cluster is based on VMs build with packer and each of them contains all the rke pre-requisites (docker images used by rancher are still loaded in the local docker registry of each vm).
For the moment my work arround is to patch dynamically the deployment of metrics-server after k8s instanciation but want to avoid this.
I cannot use the Air-gapped mode with a registry outside of my cluster but i have a private docker registry inside my cluster deployed on each master.