https://garden.io logo
#🌱|help-and-getting-started
Performance Kaniko incluster build
# 🌱|help-and-getting-started
c

colossal-salesclerk-87522

04/11/2023, 11:51 AM
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

quaint-dress-831

04/12/2023, 9:52 AM
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

bright-policeman-43626

04/12/2023, 4:43 PM
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

swift-garage-61180

04/13/2023, 7:53 PM
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

colossal-salesclerk-87522

04/14/2023, 3:44 PM
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

quaint-dress-831

04/14/2023, 3:47 PM
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

colossal-salesclerk-87522

04/15/2023, 11:22 AM
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

quaint-dress-831

04/18/2023, 2:36 PM
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

swift-garage-61180

04/26/2023, 1:30 PM
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)
12 Views