Rancher kubectl shell pod tries to pull an image from external dockerhub instead of pulling from private registry
This document (000021253) is provided subject to the disclaimer at the end of this document.
Environment
Rancher 2.6.x, 2.7.x and 2.8.x
Situation
- In the Rancher airgap environment, all the images including rancher-shell should get pulled from the default private registry, but there are some situations where few images are getting pulled from the external docker hub instead of the default private registry.
Resolution
- Verify the rancher "system-default-registry" propertyis correctly configured using the below command. If it's not, then follow the document [1] 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>"
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.