https://rancher.com/ logo
#k3d
Title
# k3d
m

millions-alarm-86298

05/06/2022, 9:03 AM
skaffold + k3d is unbeatable combo for CI / CD and e2e testing of helm charts very smoothly running on GH Actions and allows doing "crazy things" 😉
🙏 1
🎉 1
w

wide-garage-9465

05/06/2022, 9:04 AM
Thank you very much for the amazing feedback 🙂
m

millions-alarm-86298

05/06/2022, 9:06 AM
thnx for the great tool @wide-garage-9465
❤️ 1
w

wide-garage-9465

05/06/2022, 9:54 AM
Thank you very much for your support ❤️
g

green-musician-2686

05/06/2022, 11:09 AM
@millions-alarm-86298 fancy a blog about your experience ? 🙂
m

millions-alarm-86298

05/06/2022, 11:23 AM
rather no 🙂 it's too difiicult for me 🙂
g

green-musician-2686

05/06/2022, 12:43 PM
what is the value of skaffold in this combo ?
m

millions-alarm-86298

05/06/2022, 1:25 PM
• build images passing env vars to BuildKit • use local registry (provided by k3d) in CI instead of publishing in each build to dockerhub or smth • parametrizing chart with values depending on env • simpler start / stop of helm chart thatn actually using helm • finally build and publish dockers to real regstry
that's how I use it, but there are more scenarios other pplz use
g

green-musician-2686

05/06/2022, 3:12 PM
but when you run k3d as local registry in CI - how do you make it persistent 🤔
m

millions-alarm-86298

05/06/2022, 7:50 PM
hmmm i don't understand the question, plz re-phrase
g

green-musician-2686

05/09/2022, 8:24 AM
I am referring to this point:
use local registry (provided by k3d) in CI
If you run k3d in CI then you spin up new k3d-based, docker registry on every run. Is that true ?
m

millions-alarm-86298

05/09/2022, 7:49 PM
yes, exactly
CI images not published to dockerhub on every run, i can leverage k3d registry for regular CI builds and still be able to use those image in my charts and publish to dockerhub only in release job
g

green-musician-2686

05/10/2022, 8:00 AM
I am not sure what CI you are using but in our case (Gitlab) we would need to "share" artifacts (read: push to and pull from the gitlab server). I wonder how you keep k3d persistent between CI tasks/jobs. Any magic ?
m

millions-alarm-86298

05/10/2022, 8:03 AM
i don't keep them because I don't need them i only need a registry during a CI job run 1. build a docker and push to local registry 2. start my helm chart with local images 3. test helm chart 4. shutdown k3d + registry
such proceses happend dozen time a day for dozens of repositories we would kill gitlab / github / dockerhub registry if we publish all those temp images there so k3d + local registry is a life saver
g

green-musician-2686

05/10/2022, 10:49 AM
so in the same pipeline you build and push the docker image to k3d-based registry and then deploy helm chart with this image to the same k3d ?
m

millions-alarm-86298

05/10/2022, 11:19 AM
yes
g

green-musician-2686

05/10/2022, 12:59 PM
thanks
45 Views