Rancher kubectl shell pod tries to pull an image from external dockerhub instead of pulling from private registry
Article Number: 000021253
Environment
Rancher 2.6.x, 2.7.x and 2.8.x
Situation
In a Rancher airgap environment, all the images including rancher-shell should get pulled from the default private registry, but there are some situations where a few images are pulled from the external docker hub instead of the default private registry.
Resolution
- Verify the rancher "system-default-registry" property is correctly configured using the below command. If it's not, then follow the documentation and re-configure the registry with the Rancher server.
> kubectl get settings.management.cattle.io | grep -i system-default-registry
system-default-registry <registery URL here>
- If the registry is correctly configured, then verify the 'shell-image' and correct the repo value accordingly using below commands:
a) kubectl edit settings shell-image
b) modify the value section :
apiVersion: management.cattle.io/v3
customized: false
default: rancher/shell:v0.1.19
kind: Setting
metadata:
creationTimestamp: "2023-02-12T05:45:41Z"
generation: 2
name: shell-image
resourceVersion: "53446115"
uid: 39391805-a73a-45b1-b0c4-c336f6326c12
source: ""
value: "<add_value_here>"