Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build kubernetes on Mac #229

Closed
tedyu opened this issue Jan 16, 2019 · 6 comments

Comments

Projects
None yet
4 participants
@tedyu
Copy link

commented Jan 16, 2019

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

@BenTheElder

This comment has been minimized.

Copy link
Member

commented Jan 16, 2019

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.

@tedyu

This comment has been minimized.

Copy link
Author

commented Jan 16, 2019

Increasing memory of docker solves the problem.

Thanks

@tedyu tedyu closed this Jan 16, 2019

@BenTheElder

This comment has been minimized.

Copy link
Member

commented Jan 16, 2019

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

@idealhack

This comment has been minimized.

Copy link
Member

commented Jan 16, 2019

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

@alejandrox1

This comment has been minimized.

Copy link
Contributor

commented Jan 16, 2019

@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!).

@BenTheElder

This comment has been minimized.

Copy link
Member

commented Jan 16, 2019

Thanks @alejandrox1 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.