Search code examples
google-cloud-platformgoogle-cloud-buildkaniko

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


Solution

  • 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.