k3s not honoring /etc/rancher/k3s/registries.yaml #9868
Replies: 2 comments 2 replies
-
Can you confirm that you configured registries.yaml on all nodes - both servers and agents? You need to configure the containerd registry mirrors on all nodes, not just the server. The containerd log suggests the node the pod is running on does not have any mirrors configured. You can also check You might also note the behavior described here: https://docs.k3s.io/installation/private-registry#default-endpoint-fallback - if your endpoints are not reachable, containerd will by default fall back to trying the registry by hostname. |
Beta Was this translation helpful? Give feedback.
-
OK. Sorry for bothering you. But I was not able to find the appropriate logs. You, asking the right questions, pointed me to the right spots. Big Thanks! |
Beta Was this translation helpful? Give feedback.
-
Environmental Info:
K3s Version:
k3s -v
k3s version v1.28.7+k3s1 (051b14b)
go version go1.21.7
(same behavior with k3s_v1.26.14+k3s1 and k3s_v1.29.3+k3s1)
Node(s) CPU architecture, OS, and Version:
Linux k3s-node2.local 5.14.0-362.18.1.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jan 29 07:05:48 EST 2024 x86_64 x86_64 x86_64 GNU/Linux
Cluster Configuration:
1 server, 2 agents
Describe the bug:
I created my own, modified container image for nginx and pushed it to my own registry (insecure, DNS = container-registry.internal / IP = 192.168.225.11, Port 5000).
Via plain docker I can pull and execute this image.
I setup /etc/rancher/k3s/registries.yaml so that a "dummy registry" is mapped to my own registry, so that uses the entry in registries.yaml.
When I try to run a deployment via k3s in which I use my own nginx-image (mmnginxhostname) registries.yaml seems not to be honored.
Steps To Reproduce:
curl -sfL https://get.k3s.io | sh -s - server --cluster-init
when I scale this to 1, I get "no such host" (this):
Expected behavior:
I expect k3s to use the container-registry defined in /etc/rancher/k3s/registries.yaml
Actual behavior:
k3s is not honoring registries.yaml
Additional context / logs:
Log already at "Steps To Reproduce" provided
Beta Was this translation helpful? Give feedback.
All reactions