Comments (5)
I believe this is a duplicate of #9341
Remove the second endpoint, you don't need to specify the default endpoint; it is always tried last - and on this specific release it triggers a bug in the registries configuration.
from k3s.
@brandond I removed the second default endpoint, but the situation is still the same.
root@ip-172-31-15-10:/etc/rancher/k3s# cat registries.yaml
mirrors:
"docker.io":
endpoint:
- "https://docker.nju.edu.cn/"
root@ip-172-31-15-10:/etc/rancher/k3s#
root@ip-172-31-15-10:/etc/rancher/k3s# systemctl restart k3s
root@ip-172-31-15-10:/etc/rancher/k3s# crictl info | grep -A 5 "registry"
"registry": {
"configPath": "/var/lib/rancher/k3s/agent/etc/containerd/certs.d",
"mirrors": null,
"configs": null,
"auths": null,
"headers": null
from k3s.
I'm not sure that crictl info
will show mirrors when configPath is in use; you have to actually look at the filesystem. Have you checked to confirm that /var/lib/rancher/k3s/agent/etc/containerd/certs.d/docker.io/hosts.toml
exists and has the correct content?
ref: https://github.com/containerd/containerd/blob/main/docs/hosts.md
from k3s.
/var/lib/rancher/k3s/agent/etc/containerd/certs.d/docker.io/hosts.toml
of v1.28.7+k3s1 shows the mirror I configured:
root@ip-172-31-4-143:~# cat /etc/rancher/k3s/registries.yaml
mirrors:
"docker.io":
endpoint:
- "https://docker.nju.edu.cn/"
root@ip-172-31-4-143:~# cat /var/lib/rancher/k3s/agent/etc/containerd/certs.d/docker.io/hosts.toml
# File generated by k3s. DO NOT EDIT.
server = "https://registry-1.docker.io/v2"
[host."https://docker.nju.edu.cn/v2"]
capabilities = ["pull", "resolve"]
However, I also tried the same operation using v1.28.5+k3s1. Using v1.28.5+k3s1, I can display the mirror information through crictl info:
root@ip-172-31-10-120:~# k3s -v
k3s version v1.28.5+k3s1 (5b2d1271)
go version go1.20.12
root@ip-172-31-10-120:~# crictl info | grep -A 5 "registry"
"registry": {
"configPath": "",
"mirrors": {
"docker.io": {
"endpoint": [
"https://docker.nju.edu.cn/"
root@ip-172-31-10-120:~# cat /etc/rancher/k3s/registries.yaml
mirrors:
"docker.io":
endpoint:
- "https://docker.nju.edu.cn/"
Moreover, I also observed that the Containerd versions of v1.28.7+k3s1 and v1.28.5+k3s1 are both v1.7.11-k3s2
, @brandond Do you know the reason why v1.28.7+k3s1 cannot display mirror through crictl info?
from k3s.
Because we switched to using hosts.d (configPath) instead of the deprecated inline mirrors config.
from k3s.
Related Issues (20)
- Agent node IP not replaced with Tailscale VPN IP HOT 7
- Pods not always creating logs HOT 1
- Best practice of setting the cluster name at deployment level HOT 4
- k3s crashes if I do not start the cloud-provider
- sh: 0: cannot open –: No such file
- Report the use of components with vulnerabilities in k3s HOT 1
- Update etcd to >= v3.5.13
- Improve documentation for Tailscale + K3s with an example ACL HOT 1
- Pod priority enforcement without killing lower priority pods
- netpol controller does not honor debug: true HOT 1
- Availability of StructuredAuthenticationConfiguration in 1.30.0-k3s HOT 1
- k3s 使用mysql 8.0.20 版本存储kine表,启动k3s后,mysql进程会反复重启,k3s报错连接被拒绝 HOT 1
- etcd curl: (58) unable to load client key: -8178 (SEC_ERROR_BAD_KEY) HOT 6
- Image pulls from embedded registry fail if --bind-address is set (and not 127.0.0.1) HOT 5
- missing kernel config check
- k3s-agent Fails to start with with embedded registry and kill entire OS HOT 7
- Update kube-router to v2.1.2
- unable to get REST mapping for extensions HOT 1
- anget node working but access fail on anget node HOT 3
- container didn't get the environment var from CONTAINERD_XXX HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from k3s.