0

I cloned the kubernetes repo and installed all the required packages to my mac but whenever I run build/run.sh make all or build/run.sh test I'm getting the following error:

Call stack:
  1: /go/src/k8s.io/kubernetes/hack/lib/golang.sh:857 kube::golang::build_binaries(...)
  2: hack/make-rules/build.sh:27 main(...)
Exiting with status 1
make: *** [Makefile:93: all] Error 1
!!! [0120 11:32:00] Call tree:
!!! [0120 11:32:00]  1: build/../build/common.sh:523 kube::build::run_build_command_ex(...)
!!! [0120 11:32:00]  2: build/run.sh:39 kube::build::run_build_command(...)
!!! Error in build/../build/common.sh:598
  Error in build/../build/common.sh:598. '"${docker_cmd[@]}" "${cmd[@]}"' exited with status 2
Call stack:
  1: build/../build/common.sh:598 kube::build::run_build_command_ex(...)
  2: build/../build/common.sh:523 kube::build::run_build_command(...)
  3: build/run.sh:39 main(...)
Exiting with status 1   

Any idea what I'm doing wrong? Thank you.

eladm26
  • 101

1 Answers1

0

First of all - as per your Error - the command fails on ${docker_cmd[@]}". Are you sure you have docker installed on mac?

Second, you should understand that even if you compile kubernetes binaries - they will work only inside Linux, but not Mac.

Good practice - is to run, configure, build kubernetes inside previously prepared Linux VM on your MAC.

Btw, You can refer to Picking the Right Solution or Pick right solution to see all options.

Personally I can recommend you to create Vm inside Virtualbox and build\configure everything there.

As a bonus - use How to Install Kubernetes on Mac to quickly install kubernetes.

Hope it helps.

Vit
  • 445
  • 2
  • 10
  • I'm compiling them on docker, it doesn't matter that my local machine is a mac. I installed all dependencies. – eladm26 Jan 20 '20 at 15:46
  • can you provide more details (better update post instead of comment) what exactly you already done, how you compile, which steps you have already done? What dependencies you already installed? "I installed all dependencies." sais nothing to community. Everything above will highly increase chances to receive correct and suitable answer. – Vit Jan 21 '20 at 11:30