Skip to content

Failed to build kubernetes on Mac #229

Closed

Description

@tedyu

On Mac, 'kind build node-image' failed with:

    cmd/kube-scheduler
    cmd/kube-proxy
/usr/local/go/pkg/tool/linux_amd64/link: signal: killed
!!! [0116 08:30:53] Call tree:
!!! [0116 08:30:53]  1: /go/src/k8s.io/kubernetes/hack/lib/golang.sh:614 kube::golang::build_some_binaries(...)
!!! [0116 08:30:53]  2: /go/src/k8s.io/kubernetes/hack/lib/golang.sh:758 kube::golang::build_binaries_for_platform(...)
!!! [0116 08:30:53]  3: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [0116 08:30:53] Call tree:
!!! [0116 08:30:53]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [0116 08:30:53] Call tree:
!!! [0116 08:30:53]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
make: *** [all] Error 1
Makefile:92: recipe for target 'all' failed
!!! [0116 08:30:54] Call tree:
!!! [0116 08:30:54]  1: build/../build/common.sh:518 kube::build::run_build_command_ex(...)
!!! [0116 08:30:54]  2: build/release-images.sh:38 kube::build::run_build_command(...)
make: *** [quick-release-images] Error 1
ERRO[08:30:54] Failed to build Kubernetes: failed to build images: exit status 2
Error: error building node image: failed to build kubernetes: failed to build images: exit status 2
Usage:
  kind build node-image [flags]

Flags:
      --base-image string   name:tag of the base image to use for the build (default "kindest/base:v20181203-d055041")
  -h, --help                help for node-image
      --image string        name:tag of the resulting image to be built (default "kindest/node:latest")
      --kube-root string    Path to the Kubernetes source directory (if empty, the path is autodetected)
      --type string         build type, one of [bazel, docker, apt] (default "docker")

Global Flags:
      --loglevel string   logrus log level [panic, fatal, error, warning, info, debug] (default "warning")

error building node image: failed to build kubernetes: failed to build images: exit status 2

Here is my OS:

Darwin v.com 17.7.0 Darwin Kernel Version 17.7.0: Wed Oct 10 23:06:14 PDT 2018; root:xnu-4570.71.13~1/RELEASE_X86_64 x86_64

The kubernetes source is as of commit fdfd88588596c5d35c6d62e0b8658f05f3e165c9

Docker version 18.09.0, build 4d60db4

Activity

  1. BenTheElder commented on Jan 16, 2019

    @BenTheElder
    Member

    Signal Kill in this context usually means that docker for Mac ran out of memory, can you try increasing the memory allocation? https://github.com/kubernetes-sigs/kind/blob/master/docs/user/README.md#creating-a-cluster shows how to.

  2. tedyu commented on Jan 16, 2019

    @tedyu
    Author

    Increasing memory of docker solves the problem.

    Thanks

  3. BenTheElder commented on Jan 16, 2019

    @BenTheElder
    Member

    Awesome, glad to hear it! Maybe we should mention this somewhere in the docs for building as well. Thoughts @alejandrox1 ? 🤔

  4. idealhack commented on Jan 16, 2019

    @idealhack
    Contributor

    +1 on this should be documented.

    I had once seen a PR trying to fix a similar issue on k/k but seems not adding at the right place, so it just got rotten.

  5. alejandrox1 commented on Jan 16, 2019

    @alejandrox1
    Contributor

    @BenTheElder I'm definitely for adding this types of errors - supporting a local dev/testing environment for various systems would be nice. If we get enough users it may even be nice to pull this from the user docs into a series of runbooks.
    I'll work on work on adding this to the docs and will try to replicate it (I have just the Mac for the job!).

  6. BenTheElder commented on Jan 16, 2019

    @BenTheElder
    Member

    Thanks @alejandrox1 :-)

  7. added a commit that references this issue on Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions