Sokolowadim
Sokolowadim

Reputation: 63

Google Cloud Build with kaniko cache fails

I'm using Google Cloud Build along with kaniko cache for speedup. Until recently if worked perfectly, but now it's failing with

ERROR: build step 2 "gcr.io/kaniko-project/executor:latest" failed: step exited with non-zero status: 137

I assume, it's because builder is running out of memory

Is there a way to select higher level VM for this or increase memory?

I'm using the same standard configuration that is described here.

Thanks in advance

P.s. Regular builds with gcr.io/cloud-builders/docker are going through

Upvotes: 6

Views: 3506

Answers (2)

Nori
Nori

Reputation: 3022

I had same issue. I forgot to run this command to activate kaniko cache.

gcloud config set builds/use_kaniko True

After that, the error disappeared.

Upvotes: -1

Rafael Lemos
Rafael Lemos

Reputation: 5829

Yes, this is possible, all you have to do is specify what machine type you want to use during your build at the build command, as you can see in this documentation where there are also examples with how to start builds with this special machines is gcloud, Yaml and JSON .

Currently the machine types available for this are

UNSPECIFIED     Standard machine type.
N1_HIGHCPU_8    Highcpu machine with 8 CPUs.
N1_HIGHCPU_32   Highcpu machine with 32 CPUs.
E2_HIGHCPU_8    Highcpu e2 machine with 8 CPUs.
E2_HIGHCPU_32   Highcpu e2 machine with 32 CPUs.

And you can find more information on those specific types of machines in here.

Upvotes: 5

Related Questions