Performance Kaniko incluster build
# 🌱|help-and-getting-started
c
Hi all, is there any guide how to optimize Kaniko in cluster build. We currently have the problem that we run into timeout with yarn builds for the react frontend because the CPU is exhausted. How can i scale Kanikopods independently via garden.
q
Hi @colossal-salesclerk-87522, can you try and set the resources for your Kaniko pods using @freezing-pharmacist-34446' solution and let us know if that solves the issue? https://github.com/garden-io/garden/issues/3469#issuecomment-1440238061
b
This is great, you can setup higher limits here https://docs.garden.io/reference/providers/kubernetes#providers-.resources.builder Please let us know if you have any further questions! 🏡
s
Just chiming in here: The cluster-buildkit mode can have better performance characteristics in some situations (and is currently the recommended default). Did you consider that option, or do you think kaniko makes more sense for your use-case? Glad to see you're using Garden!
c
cluster-buildkit doesnt work for me currently it has always timeouts accessing the azure container registry. And for the first answer my problem is not specificaly for GKE
q
This sounds like it's worth a bug report if you're up for it, Fabian! We want to fix bugs our community uncovers and the first place we look is our GitHub issue tracker
c
I got cluster builtkit to work but now having problems with yarn global and privilegs, is there a way to run it with privilegs. yarn global add server results in the following: error An unexpected error occurred: "EACCES: permission denied, mkdir '/.config'". info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
seems its the case with production: true but its a little strange since because i would not be able to run cmd like that in any image.
q
Hey Fabian, I also struggled with this because I expected
production: true
just asked for confirmation from the user before deploying
Specifically, be on the lookout for this one: "Set a restricted securityContext for Pods (runAsUser: 1000, runAsGroup: 3000, fsGroup: 2000)."
s
Note: This only applies to
container
modules. Any
helm
or
kubernetes
modules/services are unaffected by this.
(we should update our docs to clarify that)
16 Views