How to fix CSI Image pull error on a single node #505
-
Hi, I've made a fresh install, where my terraform config is the kube.tf example with some extra nodes and longhorn enabled:
After it is installed, the
So, I've tried destroying and recreating, but there's always a single node where this happens. Any tips? Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 21 comments 99 replies
-
This is an issue we have been seeing a few times, please search in the issues and discussions. It seems that github rate limits the container registry requests. It can be solved by using another container registry via the |
Beta Was this translation helpful? Give feedback.
-
This is a duplicate of #442, but not everyone can deploy his own private registry. @pbnsilva did it finally work for you? Please try again, as is, without doing anything. It might work now, as I think gcr.io was overwhelmed about two weeks ago, but now we are not hearing more about this issue. Please confirm if possible! |
Beta Was this translation helpful? Give feedback.
-
@kube-hetzner/core This problem is still raging! I believe it is k8s.gcr.io that is rate-limiting / blacklisting some IPs on Hetzner. It is mainly the CSI manifest that uses those, and since it passes through kustomize, we can easily alter those. But where do you think we can find those same containers and versions? See the screenshot below with the 403 errors. |
Beta Was this translation helpful? Give feedback.
-
Turns out that even with registry.k8s.io, this rate limit things gets it with the csi yaml, probably because it fetches a lot of images at the same time. |
Beta Was this translation helpful? Give feedback.
-
Hence, I am now considering deploying a small lightweight container registry, trow for instance is a lot lighter than harbor and would do the job like a charm! @kube-hetzner/core What do you think? |
Beta Was this translation helpful? Give feedback.
-
After doing a bunch of testing, it's become clear that some Hetzner IPs are blacklisted. |
Beta Was this translation helpful? Give feedback.
-
Ouch, bad news about the blacklisting. Assuming you mean hosting a container registry publicly, wouldn't that be possible with GitHub? Or do you mean as a part of applying terraform, in order to minimize the simultaneous downloads of the same image? |
Beta Was this translation helpful? Give feedback.
-
This happened to me and the |
Beta Was this translation helpful? Give feedback.
-
Well, one more option is to manually reassign a new ip to the malfunctioning node, in console.hetzner.cloud. Worked for me, as only a single node had an ip which was blocked by many services. I restarted the node, but not sure if that was necessary? Makes you wonder what kind of security issues some Hetzner users must have had, probably had a machine compromised and being used in a ddos attack. Hope it wasn't me. 🫣 |
Beta Was this translation helpful? Give feedback.
-
hi all, since the problem is that some ips from hetzner are simply blocked, this is imho an issue that is not solved and is not going away. So I spent the day looking into this: https://github.com/rpardini/docker-registry-proxy I have a cx11 instance up, on which I have a docker-compose setup (because it's just a few apps, kubernetes would be overkill), which hosts static files (haha, massive speedup for microos images), and which hosts that docker registry proxy. For this to work, I had to make two modifications to kube-hetzner: added a variable "additional_k3s_environment" with which you can enable It works. And it saves a lot of bandwidth! Now, my worry is that these additions are a bit of an overcomplication. The minimum change in order to be able to do this, are the two changes I explained above (I can push an MR if you want), but if we want this to work out of the box and be user friendly, either one would have to run the proxy on one of the machines, or one would have to create an additional cx11 instance in the cluster, which is a pain when you are still in the 10-server limit of the first months of your hetzner account. On the other hand, that latter scenario does have the benefit that the proxy can be part of the private network, and you can easily shield it from the outside world using the firewall. Also, then we could consider airgapping things... Thoughts? |
Beta Was this translation helpful? Give feedback.
-
Folks, thank goodness, they have identified the issue at the source and are working on a fix! kubernetes/registry.k8s.io#138 |
Beta Was this translation helpful? Give feedback.
-
@valkenburg-prevue-ch @aleksasiriski Actually folks, using the |
Beta Was this translation helpful? Give feedback.
-
Far from ready for a PR, but here is a branch where I try to get a container proxy integrated into the project: https://github.com/kube-hetzner/terraform-hcloud-kube-hetzner/tree/feat/integrated-proxy Please test it if you have time. Set this:
Beware:
For fun, ssh into the proxy machine, and to this:
and shit back with some popcorn and watch the |
Beta Was this translation helpful? Give feedback.
-
Well, you see, the replacing of links is something I'm worried about. It's unstable and hence high maintenance. From the link you posted to the k3s docs about k3s_registries, I understand that mirroring is actually much easier, and you don't need to replace any links at all. It goes down the list looking for mirrored versions of the images.
I would like to understand how that works, though, how you setup such a mirror and how you populate it. This mitm proxy is super easy as it populate everything on demand. Hopefully jfrog or harbor can do that?
…-------- Oorspronkelijk bericht --------
Op 26 jan. 2023 21:24, schreef Karim Naufal :
If it works, we just replace the links during the kustomization and boom, problem partially solved. At least the cluster will deploy well! And later those who want can use k3s_registries with an array of options.
—
Reply to this email directly, [view it on GitHub](https://github.com/orgs/kube-hetzner/discussions/505#discussioncomment-4791186), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/A3W7X2JTAACD7X33G5PUXTDWULMPPANCNFSM6AAAAAATYQFRJ4).
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
When a service is free, I do not want us to provide and maintain servers and infrastructure. All is in your hands @valkenburg-prevue-ch. Providing an alternative solution to Jfrog proxying would definitely be great, like a module, offered in a new repo, that deploys a server that can be attached to a local network, and provide proxy services. The only requirement would be that it lives in the same Hetzner project of course so that the network is visible. So, it would have the network name as a variable of course. And another variable would be the config itself of the tool, with defaults that work for problematic registries that we know of. If when they deploy they get a bad IP, we have to check at the end and output the value of SUCCESS or FAILURE. And if Failure, we explain the procedure of destroying, reserving the IP (great tip from @aleksasiriski), and applying again. Now if somehow this can work with |
Beta Was this translation helpful? Give feedback.
-
Just so you know, everyone, Hetzner, and the Kubernetes team are both aware of the issue and Hetzner seems to accept support requests for that issue (over at https://console.hetzner.cloud/support). They may have a way to clear the IP or most probably just assign a new one to the node! See kubernetes/registry.k8s.io#138 (comment) and hetznercloud/csi-driver#373 (comment) It does require opening a support ticket over at https://console.hetzner.cloud/support. That said, I am still curious to try Trow, the in-cluster image registry (below is a fork with the functionality we need that is being merged into the main project here Trow-Registry/trow#329, however, we can just use the fork for now as it's well maintained by an active dev): https://github.com/Extrality/trow/blob/main/docs/USER_GUIDE.md#proxying-other-registries-and-mutatingwebhook |
Beta Was this translation helpful? Give feedback.
-
I followed following gist to create a mirror on one of my servers. https://gist.github.com/giggio/2ebdb2ad98c8ab7a003396f733ec6d61 Finally it works! |
Beta Was this translation helpful? Give feedback.
-
Folks, new solutions showed up, the best seems to be to just install Spegel or peerd. The former seems simpler. |
Beta Was this translation helpful? Give feedback.
Just so you know, everyone, Hetzner, and the Kubernetes team are both aware of the issue and Hetzner seems to accept support requests for that issue (over at https://console.hetzner.cloud/support). They may have a way to clear the IP or most probably just assign a new one to the node!
See kubernetes/registry.k8s.io#138 (comment) and hetznercloud/csi-driver#373 (comment)
It does require opening a support ticket over at https://console.hetzner.cloud/support.
That said, I am still curious to try Trow, the in-cluster image registry (below is a fork with the functionality we need that is being merged into the main project here Trow-Registry/trow#329, however, we can just use the fork for now …