-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
How to pull image from private registry? #987
Comments
hi, have a try this: k3s crictl pull --creds USERNAME[:PASSWORD] |
hi configured my private registry on /etc/rancher/k3s/registries.yaml file and I cannot pull my image. |
@carlosmkb i suggest use cmd to pull image again. |
I tried this, same error FATA[2019-10-30T14:23:39.122757012+08:00] pulling image failed: rpc error: code = Unknown desc = failed to pull and unpack image "docker.xxx.cn:5000/maxfaith/miop_ui:development": failed to resolve reference "docker.xxx.cn:5000/maxfaith/miop_ui:development": failed to do request: Head https://docker.xxx.cn:5000/v2/maxfaith/miop_ui/manifests/development: x509: certificate has expired or is not yet valid |
it seems this config not effected [plugins.cri.registry.mirrors] |
x509: certificate has expired or is not yet valid, it maybe your ntp time is not sync on master, and client server. please double check the situation. |
@hillbun have you try it |
mostly it is not time problem. My private registry is insecure. any similar configureation in docker to solve this problem? |
[plugins.cri.registry.mirrors] [plugins.cri.registry.configs."docker.xxx.cn:5000".auth] crictl pull docker.xxx.cn:5000/maxfaith/miop_ui:development the errir occupied |
also, when k3s yalm define imagePullSecrets, it can not pull image either. |
@hillbun sorry for your waiting. i am on a busy case , i will go to setup a environment go test on your case asap. |
As I mentioned, my registry is NON tls |
is this a duplicate of #502 ? well, in any case i don't have any problems to use a private registry |
my k3s version is v1.0.0. i have setup docker registry without https and i use --private-registry registries.yaml. |
the --docker options is what purpose? @stone-wlg please give more insight to me. curious for the situation that. |
https://rancher.com/docs/k3s/latest/en/installation/install-options/ |
I can confirm that the default implementation with However, when running the k3s cluster with the |
@riker09 @stone-wlg the problem is apparently only related to Github registry. I have an image in a Gitlab Registry in a personal private repository in gitlab.com, I have deployed k3s 1.0 with default options (servicelb, traefik and containerd), created the secret with [1] https://dimsolution.com/blog/2018-07-06/kubernetes-using-a-private-registry-like-gitlab/ |
It looks like an issue with the Github Package Registry or containerd (or both) containerd/containerd#3291 |
Similar help is needed. |
I am trying to pull images from local docker registry by keeping 'pullSecrets:' in deployment yaml, however it is always referring to 'registries.yaml' ( which has TLS Cert & auth details ) . I see some of them succeeded to pull the images using 'pullSecrets'. Could you pls. share the steps followed or is it still known issues with K3S. |
Closing this due to age |
Thanks for helping us to improve k3s! We welcome all bug reports. Please fill out each area of the template so we can better help you. You can delete this message portion of the bug report.
Version:
Provide the output from
k3s -v
and provide the flags used to install or run k3s server.k3s version v0.10.0 (f9888ca)
Describe the bug
A clear and concise description of what the bug is.
I config /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl adding
[plugins.cri.registry.mirrors]
[plugins.cri.registry.mirrors."docker.xxx.cn"]
endpoint = ["http://docker.xxx.cn:5000"]
[plugins.cri.registry.configs."docker.xxx.cn".auth]
username = "xxxx"
password = "xxxxxxx"
when I pull
k3s crictl pull docker.xxx.cn:5000/maxfaith/miop_ui:development
error returned:
FATA[2019-10-30T14:23:39.122757012+08:00] pulling image failed: rpc error: code = Unknown desc = failed to pull and unpack image "docker.xxx.cn:5000/maxfaith/miop_ui:development": failed to resolve reference "docker.xxx.cn:5000/maxfaith/miop_ui:development": failed to do request: Head https://docker.xxx.cn:5000/v2/maxfaith/miop_ui/manifests/development: x509: certificate has expired or is not yet valid
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Actual behavior
A clear and concise description of what actually happened.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: