k3d-io / k3d

Little helper to run CNCF's k3s in Docker
https://k3d.io/
MIT License
5.46k stars 462 forks source link

[Docs] Caching container images for kube-system #906

Open iwilltry42 opened 2 years ago

iwilltry42 commented 2 years ago

Discussed in https://github.com/rancher/k3d/discussions/895

Originally posted by **sdc395** December 16, 2021 Hi all I love K3D, and I'm using it extensively for creating integration test environments. In doing so, I've noticed what seems to be a significant amount of network activity as each cluster is starting up. I'm fairly new to K8S, and so I'm not sure now to find the cause of this activity. My guess is that K3D is downloading the container images for things like CoreDNS and other pods in the `kube-system` namespace. Is there a way to cache `kube-system` (and other) container images in my local K3D-managed registry? And if my guess is wrong, can someone tell me what K3D is up to, and if it can be avoided each time I create a cluster. Thanks Simon
nwithers-ecr commented 2 years ago

I'm trying to accomplish something similar for a customer who wants an air-gapped install. I would need to pull all the required images ahead of time, setup the registry, and then push them from tarballs on the offline machine. Not quite sure how to go about telling k3d or k3s to use those images instead.